Skip to main content

Forums

This topic contains 3 replies, has 4 voices, and was last updated by  bearhead 1 year, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #261412

    rcbarros
    Participant

    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 https://codepen.io/rcbarros/pen/LzXVPp

    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.

    #261750

    Beverleyh
    Participant

    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.

    #261757

    Paulie_D
    Moderator

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

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

    https://stackoverflow.com/questions/8470070/how-to-create-grid-tile-view

    #261773

    bearhead
    Participant

    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)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star