Make 3 column layout and only content is scrollable - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Make 3 column layout and 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">
* {<!--from w  ww. j ava  2  s .c  om-->
   padding:0;
   margin:0;
}

#master {
   width:100%;
}

.left-div {
   width:151px;
   background:red;
   height:501px;
   position:fixed;
   left:0;
   top:0;
}

.center-div {
   background:yellow;
   height:501px;
   margin-left:171px;
   margin-right:321px;
}

.right-div {
   width:301px;
   background:green;
   height:501px;
   position:fixed;
   right:0;
   top:0;
}
</style> 
 </head> 
 <body> 
  <div id="master"> 
   <div class="left-div">
     Lorem ipsum.. 
   </div> 
   <div class="center-div">
     Lorem ipsum.. 
   </div> 
   <div class="right-div">
     Lorem ipsum.. 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials