Create 100% height of parent and All parent heights are dynamic - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Height

Description

Create 100% height of parent and All parent heights are dynamic

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
#header {<!--   w  w w. j a  v a2 s .  c  om-->
   background:red;
}

#main {
   overflow:hidden;
}

.left, .mid, .right {
   float:left;
   padding-bottom:10000px;
   margin-bottom:-10000px;
}

.left {
   width:31%;
   background:yellow;
}

.mid {
   width:41%;
   background:purple;
}

.right {
   width:31%;
   background:lime;
}

#footer {
   background:cyan;
}
</style> 
 </head> 
 <body translate="no"> 
  <div id="header">
    Header 
  </div> 
  <div id="main"> 
   <div class="left">
     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
   </div> 
   <div class="mid">
     Mid 
   </div> 
   <div class="right">
     Right 
   </div> 
  </div> 
  <div id="footer">
    Footer 
  </div>  
 </body>
</html>

Related Tutorials