Horizontal masonry layout with flexbox CSS only [duplicate]
Here is one option using wrapped columns, but it requires a fixed height. .card-container { display: flex; flex-flow: column wrap; height:100vh; align-items: center; background-color: #888; } A better option for CSS masonry layout is to use columns, an example is on this blog post http://w3bits.com/css-masonry/ .masonry { /* Masonry container */ -moz-column-count: 4; -webkit-column-count: 4; … Read more