Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

CSS Footer...

Options
  • 20-10-2006 5:29pm
    #1
    Closed Accounts Posts: 8,866 ✭✭✭


    Hey guys, I'm hoping someone can help here but being new to CSS I'm not sure it will be possible! I have a page layout in the format of a full width header, a thin left column, main content in the middle and a thin right column, I would like to be able to stick a footer on too, but I cant get it to stick to the bottom of the page depending on the length of the page i.e. whether it scrolls or not. Here's the CSS:
    #header{
     position:relative; 
     width:100%;
    }
    
    #navbartop{
     position:relative; 
     top:0;
     width:100%;
    } 
     
    #leftcol{
     top:40px; 
     float:left;
     position:relative; 
     }
     
    #maincol{
     top:70px;
     position: relative;
     }
    
     #rightcol{ 
     top:40px;
     float:right;
     position:relative; 
     
     }
    


Comments

  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m




  • Closed Accounts Posts: 70 ✭✭vito


    Add

    #footer {
    clear: both;
    }

    to the CSS and you should be ready to go.

    your using floats to get the left, right and center columns.


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    It seems a combination of both would be best but I just cant get it.

    The div layout is like this:

    [html]
    <div id="header">

    <div id="navbar">...</div>
    ...
    </div>

    <div id="leftcol">...</div>

    <div id="rightcol">...</div>

    <div id="maincol" align="center">...(usually contains tables)...</div>

    <div id="footer" align="center">...</div>
    [/html]

    Nav bar looks like
    #navbartop{
     position:relative; 
     top:0;
     width:100%;
    }
    


Advertisement