Fixed left bar layout - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

Fixed left bar layout

Demo Code

ResultView the demo in separate window


<html>
 <head> 
  <style>
body {<!--   w  w  w.  ja va2  s  .  c o  m-->
   width:100%;
   height:100%;
}

#container {
   width:1001px;
   height:1001px;
}

#menu {
   width:251px;
   height:301px;
   position:fixed;
   background:Chartreuse;
}

#content {
   width:651px;
   height:2001px;
   position:absolute;
   margin-left:252px;
   background:yellow;
   color:blue;
   padding:11px;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="menu"> 
   </div> 
   <div id="content">
     Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lor 
    <br>Lore 
    <br> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials