Forums

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

Home Forums CSS Horizontal Masonry Layout

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #238420
    jimleeder123
    Participant

    I can get a masonry effect on my blog posts on wordpress with a class on the container div with the following class. Individual blog posts are set to 25% width. Code below…

    #blogwrap {

    display: flex;
    flex-flow: column wrap;
    height:100vh;
    align-items: center;
    

    }

    However I know that this won’t work in older browsers namely the wonderful IE9 and earlier. Is there are a CSS fallback for this?

    I don’t want to go anywhere near JavaScript, CSS only please. Any help greatly appreciated.

    #238423
    Paulie_D
    Member

    Is there are a CSS fallback for this?

    Not really…no.

    #238424
    jimleeder123
    Participant

    Ok but is it possible to have posts going horizontally instead of vertically in masonry layout?

    Setting “flex-flow: row wrap;” puts all posts in correct order but loses the masonry effect!

    #238428
    Paulie_D
    Member

    You’d have to check the masonry docs in what order it lays them out.

    #238429
    jimleeder123
    Participant

    Please link me to these docs?

    #238435
    Paulie_D
    Member
    #238438
    jimleeder123
    Participant

    Just to clarify – I’m not using this plugin, I’m trying to create a masonry like layout using CSS.

    Have got it appearing with the style earlier on the container as a flex box, but it shows posts vertically – I want them horizontally.

    #238441
    Paulie_D
    Member

    No.

    You can’t do this with CSS….it’s not possible….that’s not the way line boxes are laid out…even with flexbox.

    #238444
    jimleeder123
    Participant

    If I set the flex direction to row it lists them horizontally, but the masonry effect goes, and the child divs don’t move up to use the empty space made by shorter child elements above.

    Seems both ways have the benefit the other needs, and lack what the other has.

    #238445
    Paulie_D
    Member

    If I set the flex direction to row it lists them horizontally, but the masonry effect goes, and the child divs don’t move up to use the empty space made by shorter child elements above.

    This is what I have been trying to tell you.

    That’s why the Masonry Js plugin exists …althugh there are others.

    #238449
    jimleeder123
    Participant

    Ok well thanks for your time and help anyway.

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