Make 3 column layout with fixed header and sidebars, only content is scrollable - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Make 3 column layout with fixed header and sidebars, only content is scrollable

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">
html,body {
   height:100%
}

.wrap {<!--from w w w.  ja v a2s .  c o m-->
   width:100%;
   height:100%;
   position:relative
}

.head {
   height:100px;
   position:fixed;
   top:0;
   left:0;
   width:100%
}

.bodywrap {
   margin-top:100px;
}

.left,.right {
   width:201px;
   top:100px;
   bottom:0px;
   position:fixed;
}

.left,.center,.right,.bodywrap {
   height:100%
}

.center {
   margin:100px 201px;
}

.left {
   left:0
}

.right {
   right:0
}

.left {
   background-color:Chartreuse;
}

.right {
   background-color:yellow;
}

.head {
   background-color:blue;
}
</style> 
 </head> 
 <body> 
  <div class="wrap"> 
   <div class="head">
     Header 
   </div> 
   <div class="bodywrap"> 
    <div class="left">
      left 
    </div> 
    <div class="right">
      right 
    </div> 
    <div class="center">
      center 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials