The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Collapsing Div with absolute positioning

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #30285

    I know I’ve solved this thousands of time but I’m tired and can’t remember how I always do it. Basically I have two divs:

    div1 { position: relative; width: 1000px; }
    div2 { position: absolute; height: 400px; width: 400px;}

    I placed div2 inside div1:

    Div1 collapses and will not contain the absolutely positioned item. I tried overflow: hidden; like I do for floats but that doesn’t work Can someone please push me in the rght direction?


Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.