Make two 100% div's stack - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div

Description

Make two 100% div's stack

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,<!--from   w  w  w  .  j  av a  2s.c om-->
body {
   margin:0;
   height:100%;
}

.wrapper {
   height:100%;
}

.header {
   background:red;
   height:66px;
}

.content {
   background:green;
   height:calc(100% - 66px);
}
</style> 
 </head> 
 <body> 
  <div class="wrapper"> 
   <div class="header">
     this is a title 
   </div> 
   <div class="content">
     this is the content 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials