Layout div with various height and width - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

Layout div with various height and 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">
body {<!--   w  ww  . ja  v a 2 s  .co m-->
   margin:0px;
   font-family:arial, verdana, sans-serif;
   text-align:center;
}

#main-frame {
   margin:0 auto;
   width:927px;
}

#main-page {
   float:left;
}

#block1 {
   border:2px solid Chartreuse;
   height:351px;
   float:left;
   width:100%;
}

#block2 {
   border:2px solid yellow;
   height:251px;
   width:401px;
}

#block3 {
   border:2px solid blue;
   height:451px;
   width:401px;
}

#block4 {
   border:2px solid pink;
   width:259px;
   height:351px;
   float:left;
}

#block5 {
   border:2px solid OrangeRed;
   width:260px;
   height:351px;
   float:right;
}

#left-column {
   width:522px;
   float:left;
}

#right-column {
   width:401px;
   float:right;
}
</style> 
 </head> 
 <body> 
  <div id="main-frame"> 
   <div id="main-page"> 
    <div id="left-column"> 
     <div id="block1">
       Lorem ip 
     </div> 
     <div id="block4">
       Lorem ips 
     </div> 
     <div id="block5">
       Lorem ips 
     </div> 
    </div> 
    <div id="right-column"> 
     <div id="block2">
       Lorem ips 
     </div> 
     <div id="block3">
       Lorem ips 
     </div> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials