Murty
Murty

Reputation: 79

Fixing the footer to the bottom of the browser

Is there any way we can fix the footer to the bottom of the window even at the time of vertical scroll. I have gone through some examples, but those never work with the vertical scroll.

Upvotes: 0

Views: 683

Answers (3)

brijit11
brijit11

Reputation: 11

You can set the bottom property to 0. Example:

.footer
{
    background-color:#FFFACD;
    bottom:0;
    position:fixed;
    z-index:250px; 
}

Upvotes: 1

Zoidberg
Zoidberg

Reputation: 10333

Here is your css

html, body {height:100%;padding:0;margin:0;}
#footer {position:absolute;bottom:0;left:0;width:100%;background-color:#f00;}
#scrollingbody {overflow:auto;height:100%;}

Here is your html

<div id="scrollingbody">content goes here</div>
<div id="footer">here is footer</div>

Upvotes: 0

RameshVel
RameshVel

Reputation: 65887

Check out the sample and its google code base

Upvotes: 1

Related Questions