You're saying you want the footer to always display at the bottom of the page?
Assuming you have your page broken down into two sections (content, which I will assume is a <div> with an ID attribute of "content" and a <div> with an ID attribute of "footer"), just set a style rule declaring the footer's position to be fixed (plus a height for the footer), and then add a bottom margin to the content div.
Like this:
Code:
<div id="content">
(page content goes here)
</div>
<div id="footer">
(footer content goes here)
</div>
In your style sheet, add the following:
Code:
#content {
margin-bottom: 5em;
}
#footer {
height: 5em;
position: fixed;
bottom: 0;
left: 0;
}
Keep in mind though, that fixed positioning will not work in Internet Explorer (however, and please do not quote me on this, I think it works in Internet Explorer 7 Beta 2).
Bookmarks