Msg#: 3858910 posted 6:02 am on Feb 27, 2009 (gmt 0)
I would like to know is it possible to use overflow and have a default height. I want the div to be at least 400px but if the content needs more space then it can just morph without messing up all the other content in the other elements.
Msg#: 3858910 posted 6:09 am on Feb 27, 2009 (gmt 0)
System: The following message was spliced on to this thread from: http://www.webmasterworld.com/css/3858916.htm [webmasterworld.com] by swa66 - 11:13 am on Feb. 27, 2009 (utc 0) I am using css overflow auto but it keep on scrolling my content and i just want it to expand my element without really messing up the other div elements.
Msg#: 3858910 posted 11:24 am on Feb 27, 2009 (gmt 0)
I've merged these two topics as I think it clarifies what you're trying to achieve.
In standards compliant browsers (read: forget about IE6 for now) setting a height means fixing it. If you then add more than can fit in it overflow will dictate how it all will react to "I've 5 moneys and only room for 3". Either the 2 extra monkey can swap cages with the other 3 as needed (scroll), either we release 2 of them in the wild and they occupy the neighbor's garden (visible), either we hide them out of view (hidden).
If you don't want the box to be fixed in size, well then don't set the height. If you want the box to have a minimal size, set the min-height (to e.g. show 3 cages even if we currently only have one monkey, so we show 2 empty cages). Similarly max-height can be use to set a maximum.