Overflow problem
I have a problem with the overflow. my CSS layout is working fine but i just cant get the nested divs to push the parent divs higher when they become full - the only overflow that works without the div either overlapping or becoming hidden is to use a scroll and well, it is rather sniffed at...quite rightly so.
How can i get the divs to act like so that as the content fills up the div it will extend and become higher with the content and push any parent divs to also become higher?
pr0gr4mm3r posted this at 19:22 — 1st July 2007.
He has: 1,502 posts
Joined: Sep 2006
Are you specifying the 'height' of the parent DIVs? That might be a problem. Consider using 'min-height' instead.
kb posted this at 06:15 — 2nd July 2007.
He has: 1,380 posts
Joined: Feb 2002
What do you mean "push...higher"? As far as I know, expanded content pushes content DOWN... always. I guess I could be wrong, maybe with some Javascript thing...
If you want to control size, you can specify "height", "min-height", and "max-height"... "overflow: auto;" would allow scrolling... but "overflow: none;" wouldn't.
So... I think you either have to choose between the div sizing itself and pushing down the page, or a scrolling content div.
benf posted this at 10:53 — 2nd July 2007.
They have: 426 posts
Joined: Feb 2005
i need to be more clear. When i say higher i mean by the height of the parent divs height to expand with the child div as the content fills it up. i have been specifying min-height as 500px by also setting the height to 100% because i dont know what the max-heght will be!
The child div is fine, it expands as more text is placed inside of it, but its parent div will not expand with it?
Good Value Professional VPS Hosting
webwiz posted this at 01:03 — 3rd July 2007.
He has: 629 posts
Joined: May 2007
"display: table;" or "display: table-cell;" should do it. Only for modern browsers, though.
There may be other solutions for The World's Favorite Browser[TM]. We'd need to see your page first, though.
Cordially, David.
Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.