Div inside div with 100% height and keep footer at the bottom - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer aligned bottom

Description

Div inside div with 100% height and keep footer at the bottom

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%;
}

#wrap {<!--   w  w  w  .  j a  va  2s. c o m-->
   position:absolute;
   display:table;
   height:100%;
   width:96%;
   padding-bottom:61px;
}

.dashboard {
   width:96%;
   height:201%;
   display:table;
   border:6px solid Chartreuse;
}

.inner-dashboard {
   width:96%;
   height:100%;
   display:table-cell;
   border:6px solid yellow;
}

#footer {
   display:table;
   height:61px;
   width:96%;
   border:6px solid blue;
   bottom:-11px;
}
</style> 
 </head> 
 <body> 
  <div id="wrap"> 
   <div class="dashboard"> 
    <div class="inner-dashboard"> 
    </div> 
   </div> 
   <div id="footer"></div> 
  </div>  
 </body>
</html>

Related Tutorials