Results 1 to 3 of 3

Thread: 2 columns layout

  1. #1
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default 2 columns layout

    Hi,

    I have 2 columns in my body and 1 footer,

    Here is my css:

    PHP Code:
    body{
        
    direction:rtl;
        
    margin:0 auto;
        
    padding:0;
        
    width:780px;
        
    font-family:ArialHelveticasans-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:
    PHP Code:
    <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!
    Last edited by lord22; 11-08-2009 at 09:35 PM.

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    you haven't cleared the float's

    Code:
    #footer {clear:both}

  3. #3
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default

    Thank you very very much!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •