How to fridge the position of a particular div

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GopalSIngh1984
    New Member
    • Aug 2013
    • 1

    How to fridge the position of a particular div

    I want to fridge the position of a particular div & rest all of div should be scrollable .
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Use CSS to give it absolute positioning.

    Comment

    • vinayjg
      New Member
      • Aug 2013
      • 1

      #3
      Use

      Code:
      position:fixed
      Its makes that element non scrollable and gets fixed to the location you specify

      Comment

      • shadowstrike
        New Member
        • Aug 2013
        • 21

        #4
        Wrap the perticular div and fix its position using
        Code:
        position:fixed
        To make that scrollable add
        Code:
        overflow:scrollable
        Here is a small snippet:-
        Code:
        <html>
        
        <body>
         <style type="text/css">
        .search-result{
        	
        	height: 150px;
        	width: 205px;
        	border: 1px solid;
        	overflow: scroll;
        	position: fixed;
        }
        .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>
        </div>
        </body>
        
        </html>

        Comment

        Working...