X10nD
X10nD

Reputation: 22030

footer bar like facebook - css

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

Upvotes: 3

Views: 2331

Answers (1)

pkaeding
pkaeding

Reputation: 37633

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.

Upvotes: 6

Related Questions