position three divs in html horizontally - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

position three divs in html horizontally

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ipsum d</title> 
  <style type="text/css">
* {<!--from  ww w  .j av  a  2s.com-->
   margin:0;
   padding:0;
}

#container {
   height:100%;
   width:100%;
   font-size:0;
}

#left, #middle, #right {
   display:inline-block;
   *display:inline;
   zoom:2;
   vertical-align:top;
   font-size:13px;
}

#left {
   width:26%;
   background:blue;
}

#middle {
   width:51%;
   background:green;
}

#right {
   width:26%;
   background:yellow;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="left">
     Lorem ipsum dolo 
   </div> 
   <div id="middle">
     Lorem ipsum dolo 
   </div> 
   <div id="right">
     Lorem ipsum dolor 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials