Log in

View Full Version : 2 columns layout



lord22
11-08-2009, 09:07 PM
Hi,

I have 2 columns in my body and 1 footer,

Here is my css:


body{
direction:rtl;
margin:0 auto;
padding:0;
width:780px;
font-family:Arial, Helvetica, sans-serif;
}

#right{
width:615px;
height:1050px;
background-color:#963;
float:right;
padding:0;
margin:0;
}

#left{
width:156px;
height:1050px;
background-color:#F36;
float:left;
padding:0;
margin:0;
}

#footer{
width:780px;
height:84px;
background-color:#333300;
padding:0;
margin:0;
}


Here is my HTML body:


<div id="right"></div>
<div id="left"></div>
<div id="footer"></div>


What is wrong in the css? (the footer stays at the top of the page)

Thanks!

boogyman
11-08-2009, 11:22 PM
you haven't cleared the float's



#footer {clear:both}

lord22
11-09-2009, 05:17 AM
Thank you very very much!