Create two column layout with header and footer with 100% width - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer Column

Description

Create two column layout with header and footer with 100% width

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">
*
 {
   color:Chartreuse;
   text-align:center;
}

#container<!--  w w  w.  ja v  a 2s . c  o m-->
 {
   border:2px solid yellow;
   display:table;
   height:301px;
   width:100%;
}

header
 {
   background-color:blue;
   height:100px;
}

#main {
   background-color:pink;
}

#sidebar
 {
   width:151px;
   float:left;
}

#content
 {
   background-color:WhiteSmoke;
   margin-left:151px;
   height:100px;
}

footer
 {
   background-color:OrangeRed;
   height:100px;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <header>
     HEADER 
   </header> 
   <section id="main"> 
    <section id="sidebar">
      SIDEBAR 
    </section> 
    <section id="content">
      CONTENT AREA 
    </section> 
   </section> 
   <footer>
     FOOTER 
   </footer> 
  </div>  
 </body>
</html>

Related Tutorials