Make DIV 100% height of browser without vertical scrolling of header - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Make DIV 100% height of browser without vertical scrolling of 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">

html, body{
   height: 100%;
   margin: 0;
   overflow:hidden;
}
.header{<!--  www  . j a  v  a 2  s  . com-->
   background: #333;
   padding: 15px;
   text-align:center;
   font-size: 18px;
   color: #FFF;
}
.leftpanel, .rightpanel{
   height: 100%;
}
.leftpanel{
   float: left;
   width: 70%;
   background: #CCC;
}
.rightpanel{
   float: left;
   width: 30%;
   background: #666;
}
#scrollableBox {
   overflow: auto;
   width: 200px;
   height: 200px;
   margin: 30px;
   padding: 20px;
   background: white;
}
.clearfix{clear: both}


      </style> 
 </head> 
 <body> 
  <div class="header">
    Header 
  </div> 
  <div class="leftpanel">
    Left Panel 
   <div id="scrollableBox">
     this is test this is test this is test this is test this is test this is test this is test this is test this is test 
   </div> 
  </div> 
  <div class="rightpanel">
    Right Panel 
  </div> 
  <div class="clearfix"></div>  
 </body>
</html>

Related Tutorials