Li elements in div with scrollbar - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Li elements in div with scrollbar

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body, html {
   padding:0;
   margin:0;
}

.main {<!--from  w  w  w. jav  a  2 s . com-->
   position:relative;
}

#left {
   background-color:Chartreuse;
   overflow:auto;
   position:absolute;
   top:0;
   bottom:0;
   width:251px;
}

#right {
   background-color:yellow;
   width:751px;
   margin-left:251px;
}
</style> 
 </head> 
 <body> 
  <div class="main"> 
   <div id="left"> 
    <ul> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
     <li>Lor</li> 
    </ul> 
   </div> 
   <div id="right">
     Lorem ipsum 
    <br>Lorem ipsum 
    <br>Lorem ipsum 
    <br>Lorem ipsum 
    <br>Lorem ipsum 
    <br>Lorem ipsum 
    <br>Lorem ipsum 
    <br> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials