Having left and right content boxes css - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Box

Description

Having left and right content boxes css

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style media="all">
.contentcenter<!--   w  w w . j  ava 2s.c om-->
 {
   margin:0 auto;
   padding:0;
   width:1001px;
   border:4px solid Chartreuse;
   overflow:hidden;
}

.contentleft {
   float:left;
}

.contentright {
   float:right;
}

.contentleft, .contentright
 {
   width:451px;
   border:4px solid yellow;
   padding:0;
   font-family:Arial, Times, serif;
}

.contentleft h1, .contentright h1
 {
   margin:0;
   padding:0;
   color:blue;
   font-family:Arial;
   display:block;
   background-color:pink;
   padding:6px 0;
}
</style> 
 </head> 
 <body> 
  <div class="contentcenter"> 
   <div class="contentleft"> 
    <h1>Lore</h1> 
    <p>Lorem ipsum dolor sit amet, con</p> 
   </div> 
   <div class="contentright"> 
    <h1>Lorem</h1> 
    <p>Lorem ipsum dolor sit amet, con</p> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials