Log in

View Full Version : Parent div not expanding when elements in child div expands out of the parent div



gurumvg
01-13-2010, 10:39 AM
Hi,

I have a issue with div's. I have two divs one inside the another. In the child div, there is a drop down form element. When the drop down width is more than
the parent div width, the drop down overflows beyond the parent div. All i need is the parent div width should also increase when the elements in child div
expands.

To be precise, the parent div width should expand when the content in the child div expands horizontally.

I googled a lot but unfortunately i was unable to figure it out.

Thanks in advance for your time and attention.

bluewalrus
01-13-2010, 01:48 PM
Got a link or code?

simcomedia
01-23-2010, 01:25 AM
The parent div won't expand automatically if you have a fixed width assigned to it. The smart play would be to either decrease the width of the drop down item or increase the width of your parent div.