Layout stack header - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

Layout stack header

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ip</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
@charset "utf-8";

body {<!--  w ww.  j a  v  a 2  s .co m-->
   margin-left:0px;
   margin-top:0px;
   margin-right:0px;
   margin-bottom:0px;
   padding:0px;
   background-color:Chartreuse;
}

div.container {
   width:1201px;
   background-color:yellow;
   margin-left:auto;
   margin-right:auto;
}

div.header {
   height:100px;
}

div.middle {
   min-height:401;
}

div.footer {
   height:151px;
}

div.section1 {
   background-color:blue;
   height:100px;
   width:276px;
   float:left;
   position:relative;
}

div.section2 {
   background-color:pink;
   height:100px;
   width:100px;
   float:left;
   position:relative;
}

div.section3 {
   background-color:OrangeRed;
   height:51px;
}

div.section4 {
   background-color:grey;
   height:51px;
}

div.section5 {
   background-color:BlueViolet;
   width:276px;
   height:401px;
   float:left;
   height:100vh;
}

div.section6 {
   background-color:Chartreuse;
   width:926px;
   height:401px;
   float:right;
   height:100vh;
}

div.section7 {
   background-color:yellow;
   height:151px;
}

.clearfix:before, .clearfix:after {
   content:" ";
   display:table;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <header> 
    <div class="section1">
      Lorem ipsum 
    </div> 
    <div class="section2">
      Lorem ipsum 
    </div> 
    <div class="section3">
      Lorem ipsum 
    </div> 
    <div class="section4">
      Lorem ipsum 
    </div> 
   </header> 
   <div class="middle clearfix"> 
    <div class="section5">
      Lorem ipsum 
    </div> 
    <div class="section6">
      Lorem ipsum 
    </div> 
   </div> 
   <footer> 
    <div class="section7">
      Lorem ipsum 
    </div> 
   </footer> 
  </div>  
 </body>
</html>

Related Tutorials