Previous Message
Next Message

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

Sent by Andrew Clover on 31 January 2002 19:07


Joshua Prowse [EMAIL-REMOVED]> wrote:

> 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?

Maybe.

You can have both elements absolutely positioned, and give the bottom one
'overflow: scroll;'. So only the content in the lower div will scroll, the
top will stay put. By positioning the lower div so it takes up the whole
windows and giving the top div a higher index so it sits on top of the
bottom div, you've effectively got fixed-positioning. You'll need to leave
a little space for the scrollbar to poke through the top div of course.
(This approach leaves you with a spare non-functional scrollbar on the
right as well as the scrollbar on the lower div in IE. It is possible to
get rid of this, though, as has been thrashed out in an earlier thread.
The only other problem is that it doesn't work in Opera, which has a big
gaping hole in itself otherwise pretty good CSS support where 'overflow'
ought to be.)

Or you could resort to scripts. Not necessarily awful: I've got a script
that will make simple cases of 'position: fixed;' like this one work on
IE transparently (no coding required). Currently working on making it
handle more complicated cases.

-- 
Andrew Clover
[EMAIL-REMOVED]
http://and.doxdesk.com/
Previous Message
Next Message

Message thread: