Previous Message
Next Message

How to Make Web Pages Extend to Bottom of Browser Window?

Sent by Steve Clay on 6 January 2005 14:02


Wednesday, January 5, 2005, 7:17:50 PM, Pabini Gabriel-Petit wrote:
PGP> Can you please tell me how I can make Web pages on which the content
PGP> is short extend to the bottom of the browser window? At the very
PGP> least, the footer bar should always appear at the bottom of the

Here's a loose strategy for at least getting the footer down there:

1. Stretch your outermost container to the height of the viewport.
   Use a standards mode doctype and give HTML, BODY and your big container
   height:100%.
2. Reserve space in the bottom of the container for the footer with bottom
   padding.  Yes, you'll have to guess the height of your footer, but you
   can at least use ems.
3. Absolutely position your footer to the bottom of the container.
   Give your big container position:relative and the footer something like:
   #footer {position:absolute; bottom:0; left:0; right:0;}

4. Test, test, test.  I've seen these constructions out there but haven't
   used one myself.  I believe if you remove the overflow stuff, this is
   probably similar and might have some documented bug fixes:
   http://www.fu2k.org/alex/css/frames/scalable
   Regardless, you can hit up the list for bug squashing.

As for the other stuff bottom-aligning, this can probably only be done in
CSS layout with the table display properties emulating an old-school table
layout, so, it's probably not worth the trouble.

HTH,
Steve
-- 
http://mrclay.org/ * http://frenchhorns.mrclay.org/

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: