Align Div side by side - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div

Description

Align Div side by side

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <style>
.brand, .model {<!--from  w ww. j  a  va2 s  .co m-->
   float: left;
   padding: 5px;
   width: 250px;
   height: 40px;
   text-align: center;
}
.brand {
   background: rgba(88, 0, 0, 0.5);
}
.model {
   background: rgba(0, 88, 0, 0.5);
}

      </style> 
   </head> 
   <body> 
      <div class="brand">
          test 
      </div> 
      <div class="model">
          test 
      </div>  
   </body>
</html>

Related Tutorials