Divide page in two columns and align them in HTML - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Divide page in two columns and align them in HTML

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>

body {<!--from  w ww. jav  a 2s.c om-->
   width: 500px;
   height: 500px;
}
.left, .right {
   float: left;
   width: 50%;
   height: 100%;
}
.left {
   background-color: red;
}
.right {
   background-color: blue;
}


      </style> 
 </head> 
 <body translate="no"> 
  <div class="left"> 
  </div> 
  <div class="right"> 
  </div>  
 </body>
</html>

Related Tutorials