Created
June 17, 2019 14:36
-
-
Save EdCharbeneau/4e4cc15c9eea022381fcb01c3d625e23 to your computer and use it in GitHub Desktop.
Simple Masonry CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.masonry { | |
display: flex; | |
flex-flow: column wrap; | |
max-height: 800px; | |
margin-left: -8px; /* Adjustment for the gutter */ | |
width: 100%; | |
} | |
.masonry > div { | |
margin: 0 8px 8px 0; /* Some gutter */ | |
} | |
@@media only screen and (min-width: 1024px) { | |
.masonry > div { | |
width: 33.33333%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment