3 replies [Last post]
Cipes
Cipes's picture
Offline
Regular
Montreal
Last seen: 13 years 45 weeks ago
Montreal
Joined: 2008-10-01
Posts: 18
Points: 0

Hi Guys,

This is something that comes up alot for me, and Im trying to find the proper way to work
around it.
When I lay out a page, it usually has a horizontal nav bar and then below a main
#content div with two other divs contained within; #textRight, #textLeft.

I always end up setting the #content div height to a specific number, because if its set to auto itnever reads the content of the contained divs as "content" therefore they overflow and the page breaks..

How do I manage to get the #content div to recognize the content within the #textRight/#textLeft divs, so that #content accomodates and grows to the proper size?

I don't go crazy with nested divs usually, just one! or two....

Thanks folks!

crazyman1337
Offline
newbie
Last seen: 13 years 44 weeks ago
Joined: 2009-01-05
Posts: 2
Points: 0

simply after the right and

simply after the right and left divs place a " " without quotes in the content div.

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 8 years 40 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

I'll assume that the two

I'll assume that the two content divs are floating which is why they are overflowing the parent content div. Read up on containing floats but in the mean time add overflow: hidden; to #content

Cipes
Cipes's picture
Offline
Regular
Montreal
Last seen: 13 years 45 weeks ago
Montreal
Joined: 2008-10-01
Posts: 18
Points: 0

thanks Guru! Clearing the

thanks Guru!

Clearing the parent container with a

allows it to accept the child div's content and it then stretches to accomodate.

Amen.