Need a scroll button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vjayis
    New Member
    • Mar 2008
    • 134

    Need a scroll button

    Hi

    i hav a list of 20-30items from which another page is called in the same window.,

    i need to display it in a fixed size such tht 10items are listed fixed and others are viewed by scrolling., similar to frame with scroll button.

    but i dont want to do this using frame since i need to refresh the new content in the same page.,

    and i also dnt want the whole page to come inside the frame.,

    any ideas??

    regards
    vijay
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    I would place the items (I suppose they are links, right?) in a div and let the scrolling happen whenever it is needed by the browser (you never know what the window size of a user is, because some like their windows large and some not). if the list exends over the visible area, scrolling will appear.
    If you want the top 10 items always on top use a div with position: fixed (though not working in IE, there you probably need javascript)

    Comment

    • ilayacute
      New Member
      • Aug 2008
      • 17

      #3
      try 'overflow' properties in css it will helps u right?

      accept pain......
      ilaya

      Comment

      • shadowstrike
        New Member
        • Aug 2013
        • 21

        #4
        Use
        Code:
        overflow:scroll
        in your css file

        Demo is shown below:-

        Code:
        <html>
        
        <body>
         <style type="text/css">
        .search-result{
        	
        	height: 150px;
        	width: 205px;
        	border: 1px solid;
        	overflow: scroll;
        }
        .search-result .filter{
        margin-top: 30px;
        float: left;
        word-wrap: break-word;
        padding: 5px 10px;
        line-height: 15px;
        background-color: white;
        } 
         </style>
        	<div class="search-result">
        						<div class="filter">
        							<h3>Filters Applied</h3>
        							<div class="source">Gender</div>
        							<div class="user-list">
        								<span><input type="checkbox" name="gender" class="radio" value="Male" /> Male</span>
        								<span><input type="checkbox" name="gender" class="radio" vlaue="Female" /> Female</span>
        							</div>
        							<div class="source">Country</div>
        							<div class="user-list">
        								<span><input type="checkbox" value="India"> India</span>
        								<span><input type="checkbox" value="USA"> USA</span>
        								<span><input type="checkbox" value="UK"> UK</span>
        								<span><input type="text" value="Enter another country"></span>
        							</div>
        							
        	</div>
        
        
        </body>
        
        </html>

        Comment

        • Phyo Thinza
          New Member
          • Sep 2013
          • 2

          #5
          I think, it is possible by using

          overflow:auto;

          Comment

          • Exequiel
            Contributor
            • Jul 2012
            • 288

            #6
            it is better to use overflow:auto;, but you need first to set your fixed height;

            Comment

            Working...