Not Override divs

Discussion in 'CSS' started by guilhotarras, Apr 11, 2008.

  1. #1
    Hello,

    I have an issue in CSS. I have 2 divs: "center" and "bottom".
    The div "center" has variable content, this is, its content is loaded into the div dinamically throw PHP so the height of the "center" div varies depending on the content loaded throw PHP. (the width is fixed... no problem with that)

    The "bottom" div is position underneath the "center" div, so my issue is if i don't specifie a defined height for the "center" div, the content of "center" div overrides the content of "bottom" div....i don't want this to happen, i want that the "bottom" div to be pulled down not being overritten by the "center" div, depending on the height of the "center" div....

    Can anyone help me ?

    :confused:
     
    guilhotarras, Apr 11, 2008 IP
  2. Kirkbride

    Kirkbride Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Without seeing the actual HTML and CSS it's hard to say how to fix this, but you might try using "clear" for one or both of the two divs.

    #center { clear: both; }
    #bottom { clear: both; }
     
    Kirkbride, Apr 11, 2008 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Is center floating or absolute positioned? Floating you can fix it as Kirkbride said, absolute positioned you cannot... and is a sure sign the layout is being done incorrectly.

    Though without a url or the code it's like trying to instruct someone in the repair of a supercharged V-8 over a morse code telegraph.
     
    deathshadow, Apr 11, 2008 IP