Seth Green wrote:
> I'm sorry, my "what it should look like" page got screwed up. The 
> blue div should be fully contained within the outer green container.

I thought so, but that's just a negative margin-bottom that serves no
purpose apart from imitating your "screwed up" example.

> I appreciate you response, but you used fixed heights to achieve 
> this, and the whole point of my question was that I can't use fixed 
> heights.

That's no problem, but then you can't have a fixed height on the
'fixedHeightContainer', in which case you get this...
<http://www.gunlaug.no/tos/alien/test_07_2004.html>
...but I know that's not what you want either.


You're right in that CSS can't calculate what space is left at the
bottom of a container and occupy exactly that space with an element with
auto-scroll.

The way you have described it you'll have to calculate the height of
'fixedHeightContainer' and subtract the height of 'nonScrollDiv' and
give the resulting height to 'scrollDiv'. Since all elements have
'width: auto' and font-size is unknown and variable at the user end, you
need a constantly running calculation.

You also need to do something about 'nonScrollDiv', since that one will
easily overflow 'fixedHeightContainer' and leave no space for
'scrollDiv'. Just narrow the browser-window and the available height is
used up pretty soon. Alter the font-size and the same will happen.

None of this is unsolvable, IMO, but I haven't seen a working web
solution based on CSS - or anything else for that matter. Even
Javascript will probably mean a somewhat complex and conditional
solution.


Conditional redistribution of content from 'nonScrollDiv' to 'scrollDiv'
is probably the best solution, but CSS can't do that for you - at least
not in the existing versions. Would be nice though :-)

Good luck.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to