Two fixed columns with a scrollable centre - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Two fixed columns with a scrollable centre

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">

.leftDiv,<!--  w  ww.  j  a v  a  2  s.c om-->
.rightDiv,
.middleDiv {
   width: 32%;
   display: inline-block;
   border: 1px solid black;
   height: 150px;
   vertical-align: top;
}
.middleDiv {
   overflow-y: scroll;
}
.leftDiv,
.rightDiv {
   overflow: hidden;
}
}


      </style> 
 </head> 
 <body> 
  <div class="leftDiv">
    Left Div 
  </div> 
  <div class="middleDiv">
    Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> Middle Div 
   <br> 
  </div> 
  <div class="rightDiv">
    Right Div 
  </div>  
 </body>
</html>

Related Tutorials