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

Home Forums CSS Floating divs pushed down vertically.

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

    Here’s essentially the problem I have (JSFiddle)

    I have a collection of divs with a fixed width and can random heights. When I try and float them, they slot together perfectly horizontally but don’t slot together vertically.

    For example, in the JSFiddle above, the red div is placed below the lowest element on the previous row, not directly below the first div like I wanted.

    * * *
    I can’t use absolute positioning because the content inside each div is going to be random in height. I also don’t want to simply give each div a uniform height since the content is arbitrarily long, I don’t think this is the safest solution.

    How can I accomplish this?

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