Position header, side box and main box in two column layout - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Position header, side box and main box in two column layout

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">

body, html{
   height: 100%;
}
.header {<!--  w  w  w. j  av  a 2  s .c  om-->
   background-color: red;
   height:70px;
}
.container {
   height:100%;
   position: relative;
}
.sidebox {
   width: 30%;
   background-color: blue;
   color: black;
   bottom: 0;
   top: 0;
   position: absolute;
}
.content {
   background: yellow;
   left:30%;
   right: 0;
   bottom: 0;
   top: 0;
   position: absolute;
}
      </style> 
 </head> 
 <body> 
  <div class="header">
    header 
  </div> 
  <div class="container"> 
   <div class="sidebox">
     sidebox 
   </div> 
   <div class="content">
     content 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials