Previous Message
Next Message

Re: [css-d] footer w/ absolute position and height?

Sent by Tim Rivera on 29 September 2002 06:06


> and i want to have a three-band footer at the bottom of my page, no matter
> where the document ends;

I don't know about IE6, but out of IE5.5, Opera 6.05, and Mozilla 1.0,
Mozilla is the only browser capable of positioning a block at the bottom of
the page based on my testing. The other two browsers position the block at
the bottom of the viewport. Also, some browsers (i.e. Mozilla) consider the
page to be as high as the content, not the viewport. So if the page is not
long enough to scroll, the bottom of the page may not necessarily be at the
bottom of the viewport.

Though it isn't perfect, here is a step in the right direction:

body {
 position: relative;
 }

div.footer {
 border-top: 5px solid #f0f0f0;
 background: #333;
 position: absolute;
 bottom: 0;
 height: 2em;
 width: 100%;
 }

div.footer p {
 border-top: 1px solid #f0f0f0;
 margin-top: .75em;
 background: #333;
 }

<div class="footer">
<p class="copy">&copy;2002 All Rights Reserved </p>
</div>


HTH,

Tim
Previous Message
Next Message

Possibly related: