View Single Post
  #4 (permalink)  
Old Aug 9th, 2007, 21:18
Marc's Avatar
Marc Marc is offline
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,661
Thanks: 0
Thanked 9 Times in 9 Posts
Re: two divs side by side

Linda, i think you missed a bit.....!

CSS:
Code: Select all
    #container {
    width: 700px;
    }  
 
    .left {
    width: 50%;
    float: right;
    text-align: center;
    }
 
    .right{
    width: 50%;
    float: right;
    text-align: center;
    }
Code: Select all
 
<div id="container">
 
<div class="left">   Left Column   </div>
 
<div class="right">  Right Column   </div>
 
</div>
Basicly what the above is doing is puting the two columns into a big div (#container) with the width of 700px. The 2 columns are 50% so they will each be 50% of the big div = 350px. If that makes sense!

Last edited by Marc; Aug 9th, 2007 at 21:30.
Reply With Quote