CSS - position: absolute; - auto height - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Absolute Position

Description

CSS - position: absolute; - auto height

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">
.container:after {<!--   w w  w  .j av a  2 s  .c  om-->
   content:'';
   display:table;
   clear:both;
}

.page {
   float:left;
   width:100%;
   margin-right:-100%;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="page"> 
    <div style="background-color: #f0a; height: 400px;">
      Lorem ipsum dolor sit amet, conse 
    </div> 
   </div> 
   <div class="page"> 
    <div style="background-color: #0af; height: 300px;">
      Lorem ipsum dolor sit amet, conse 
    </div> 
   </div> 
   <div class="page"> 
    <div style="background-color: #fa0; height: 200px;">
      Lorem ipsum dolor sit amet, conse 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials