aip solutions developer’s blog

28/09/2009

footer stick on bottom

Filed under: CSS, HTML & XHTML — mili @ 12:27

DOCTYPE:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

CSS:

html,body    {min-height:100%;height:100%;}
.siteContent {position:relative;min-height:100%;_height:100%;}/*IE hack*/
.pageContent {padding:0 0 25px;}
.footer      {position:absolute;bottom:0;width:100%;height:25px;}

HTML:

<html>
<body>
    <div class="siteContent">
        <div class="pageContent"></div>
        <div class="footer"></div>
    </div>
</body>
</html>

BROWSERS:
IE6, IE7, IE8, FF2, FF3

FLOATS:
yes

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Anti-Spam Quiz:

Powered by WordPress