Previous Message
Next Message

[css-d] Thoughts on doing vertical layout with height:100%

Sent by Joshua Prowse on 31 January 2002 17:05


Here's a very practical question about whether it's possible to do a CSS
layout I'm wondering about:
http://radio.weblogs.com/0100725/images/2002/01/31/Proposed-CSS-Layout.gif

Blue Part: I want a bar along the top of the page that is a fixed height
(and 100% width).
Green Part: I then want a main body area to take up the remaining area of
the page.

This mirrors a layout that it very easy to do with frames or tables.

Off the top of my head, I would use the following code:

<div
style="position:fixed;top:0px;left:0px;height:100px;width:100%;background:bl
ue;">&nbsp;</div>
<div
style="position:fixed;top:100px;left:0px;right:0px;bottom:0px;background:gre
en;overflow:auto;">&nbsp;</div>

Such code actually works in Netscape 6, IIRC.  However, Internet
Explorer/Win doesn't support position:fixed.  Short of resorting to
JavaScript or frames is there any way to do this layout today?

If this isn't clear, please request clarification.

- Joshua "prowsej" Prowse
Previous Message
Next Message

Message thread: