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

Home Forums Design stack div tag under each other BUT disregarding the height

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #261412

    Hey everyone. I am not the kind to post problems looking for someone to fix it BUT I have been struggling with this one!

    I need stack several div under each other BUT disregarding the height. I have tried everything but I can figure this one out.

    You can see the pen on

    The main problem is I can set the div under each other disregarding the high

    In the Pen above – Pleas, squeeze your browser so you can see:

    111 222 333 444

    As you can see the div 777 should be under 555

    The same will happen

    111 222

    The 333 should be right under 111

    Any help will be very appreciated.


    Sorry – I don’t understand the issue. Can you have a go at explaining it again? What is supposed to happen? What are you trying to do?

    Also – you’ve got the same id used multiple times. You can only use an id once in a web page.


    Yeah…other than what Beverly said….CSS really can’t do that.

    You need Javascript…you’re after ( I think) a Masonry layout


    You might be able to do it css-only with columns:

    But note that it will render items top-to-bottom instead of left-to-right.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design’ is closed to new topics and replies.