Template for three column layout - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Template for three 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">
#container {<!--from w  w w . ja v a 2  s .  c  om-->
   width:100%;
   height:100%;
}

#header {
   background:url('https://www.java2s.com/style/demo/Google-Chrome.png') red;
   background-repeat:no-repeat;
   background-position:right top;
   height:126px;
   margin:-11px -11px 0px -11px;
}

#left-sidebar {
   left:0;
   height:2001px;
   width:201px;
   background-color:Chartreuse;
   position:absolute;
}

#right-sidebar {
   right:0;
   position:absolute;
   width:201px;
   height:2001px;
   background:green;
}

#img {
   border:2px solid;
   position:absolute;
   top:100px;
   left:0px;
   margin-left:11px;
   width:176px;
   height:176px;
}

#content {
   margin-left:-11px;
   position:absolute;
   margin:auto;
   top:131px;
   left:209px;
   right:209px;
   border:2px solid;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="header">
     Lorem 
   </div> 
   <div id="left-sidebar">
     Lorem ipsum 
    <div id="img">
      Lorem 
    </div> 
   </div> 
   <div id="right-sidebar">
     Lorem 
   </div> 
   <div id="content">
     Lorem i 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials