1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How can I make the main div expand with the content div

Discussion in 'CSS' started by jeremyhowell, Dec 5, 2010.

  1. #1
    If you visit this site here, you will notice that the content of the page is overflowing the main page, I have tried setting the height attributes to auto on the wrapper, the main tag, the content_header, everything, but it just doesnt work. Dont worry about the menu, the div to the right with the Latin place holding text is the problem.

    Can anyone help me with this?

    Here is the stylesheet: http://www.oursecretsound.com/112/style.css
    And here is the site: http://www.oursecretsound.com/112/index.html
     
    jeremyhowell, Dec 5, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    Parent elements are never to expand to contain floated elements, which are removed from the normal flow. To get what you want, you need to add 'overflow:auto' to your 'main' div.
     
    drhowarddrfine, Dec 5, 2010 IP
    jeremyhowell likes this.
  3. jeremyhowell

    jeremyhowell Member

    Messages:
    379
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    45
    #3
    Thank you drhowarddrfine, that fixed the problem.
     
    jeremyhowell, Dec 5, 2010 IP