Expand Parent Div with Size of Child Div

Discussion in 'Web Design and Development' started by krayziekray, Feb 10, 2010.

  1. krayziekray macrumors 6502

    Joined:
    Sep 24, 2008
    Location:
    127.0.0.1
    #1
    On my website I have a body div and three div's within it (childDiv1, childDiv2 & childDiv3). ChildDiv1 and 2 are floating left and ChildDiv3 is floating right (giving the 3 coloumn look).

    Now what I need to achieve is to get the body div to expand to fit the size of ChildDiv2 as the content can vary (in terms of size). I have managed to get ChildDiv2 to expand using:

    Code:
    overflow:visible;
    
    But the footer Div is placed ontop of the content as the body Div does not expand with the "overflow" of ChildDiv2.

    Does anyone know how this can be resolved?

    Cheers,
    :apple: KrayzieKray :apple:
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    It's visible not visable.

    Do you have a link to show what you're doing?
     
  3. krayziekray thread starter macrumors 6502

    Joined:
    Sep 24, 2008
    Location:
    127.0.0.1
    #3
    Oops :eek: ... yes "Visible" ... typo :rolleyes:

    I'm away from my PC, so will have to post a link once I get back.

    :apple: KrayzieKray :apple:
     
  4. krayziekray thread starter macrumors 6502

    Joined:
    Sep 24, 2008
    Location:
    127.0.0.1
    #4
    Well, finally got it working. Here's the link on how I managed to get it to work (for anyone who is having the same problem I was having).

    Thanks anyway for your help :)

    :apple: KrayzieKray :apple:
     

Share This Page