Create Header div and use body div to fill remaining space possible - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Create Header div and use body div to fill remaining space possible

Demo Code

ResultView the demo in separate window


<html>
 <head> 
  <style>

html, body {
   margin: 0;
   padding: 0;
   width: 100%;
   height: 100%;
   display:table;
}
#header {<!--from w w w .  ja v  a2s . c  o  m-->
   background-color: red;
   display:table-row;
   height:auto;
}
#body {
   background-color: green;
   display:table-row;
   height:inherit;
}

      </style> 
 </head> 
 <body> 
  <div id="header">
    header 
  </div> 
  <div id="body">
    body 
  </div>  
 </body>
</html>

Related Tutorials