tags:

views:

57

answers:

1

Hello,

I want to create a footer like facebook, that sticks at the bottom of the page, irrespective of the scroll. <div id="footer"></div>

and here is the css style

#footer{
    position:absolute;
    left:0px;
    margin-bottom:0px;
    vertical-align:bottom;
    bottom:0px;
    width:100%;
    height:25px;
    background-color:#dfd5d7;
    overflow:hidden;
}

It comes fine, when I resize the browser window it does not stick to the bottom but a about 50 pixels up.

Any solutions.

Thanks Jean

+4  A: 

Try using:

position: fixed;

It won't work in IE6 out of the box, but if supporting old, broken browsers like IE6 is important to you (unfortunately, many people are still using it), you can try the fix described here.

pkaeding
I need 8 mins to accept this answer, why stackoverflow?
Jean
The time limit is really just there to give other people a chance to propose other (possibly better) answers. But I'm glad you found my answer helpful! You should be able to accept it without a problem once the time limit expires.
pkaeding