HighDots Forums  

positioning a scrolled DIV after fluid content?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss positioning a scrolled DIV after fluid content? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lister
 
Posts: n/a

Default positioning a scrolled DIV after fluid content? - 06-05-2007 , 10:55 AM






Hi,

I have a div with fluid content, below which I want a scrollable div.
I can't work out how to style the scrollable div to say "use the rest
of the space in the container".

The best I can come up with is having the scrollable div abolutely
positioned as in my demo, but this is horrible as it doesn't follow
the fluid stuff.

Demo here:

http://www.thebunnyshed.co.uk/test.htm


Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: positioning a scrolled DIV after fluid content? - 06-05-2007 , 11:32 AM






On 2007-06-05, lister <listerofsmeg01 (AT) hotmail (DOT) com> wrote:
Quote:
Hi,

I have a div with fluid content, below which I want a scrollable div.
I can't work out how to style the scrollable div to say "use the rest
of the space in the container".

The best I can come up with is having the scrollable div abolutely
positioned as in my demo, but this is horrible as it doesn't follow
the fluid stuff.
I can't see a way of doing it without resorting to a table (or obviously
JavaScript but in my opinion using JS for layout is worse than using
tables for layout).

If you don't mind setting the height of .container to something (rather
than setting bottom) then it's possible.

What you want is for the computed value of top for .container to be its
"static position" which means the position where it would have gone if
it hadn't been positioned, which is just under the <h1>.

That is possible if you set top to auto, but you also need to set bottom
to auto. Otherwise the computed value for top is based on bottom and the
height. If bottom is auto, you will need to set the height, or it will
be based on the content, which will be far too high.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.