Advanced Search

Results 1 to 3 of 3

Thread: Parent div not expanding when elements in child div expands out of the parent div

  1. #1
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Parent div not expanding when elements in child div expands out of the parent div

    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.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Got a link or code?
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Sep 2008
    Location
    Seattle, WA
    Posts
    135
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •