Posted By

cbx on 12/14/08


Tagged

div BY boxes side


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

basicmagic
Nix
epco


Side By Side Div Boxes


 / Published in: CSS
 

URL: http://codepunk.hardwar.org.uk/acss05.htm

This code will create two side by side div boxes. Just adjust the width as needed.

  1. /*This is the CSS*/
  2.  
  3. .box1{
  4. position: relative;
  5. width: 250px;
  6. padding: 5px;
  7. float: left;
  8. }
  9.  
  10.  
  11. -----------------
  12.  
  13. <!-- This is the HTML -->
  14.  
  15. <div class="box1">
  16. <p>Content Here</p>
  17. </div>

Report this snippet  

You need to login to post a comment.