Scrollable div content area with fixed header - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Scrollable div content area with fixed header

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

.bluediv {<!-- w  ww.  ja  v a  2 s .co m-->
   background: blue;
   height: 350px;
   overflow-y : auto;
}


      </style> 
 </head> 
 <body style="width: 100%; height: 100%; padding: 0; margin: 0"> 
  <div class="web"> 
   <div style="background: green; font-size: 20px; height: 100px">
     Header 
   </div> 
   <div class="bluediv"> 
    <div style="height: 1000px">
      content 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials