Created
June 18, 2017 18:47
-
-
Save evitolins/ab45f2220186376c80d1387be40d912c to your computer and use it in GitHub Desktop.
A simple responsive grid using flexbox
This file contains hidden or 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
.grid .cell { | |
position: relative; | |
margin: 1rem 1rem 2rem; | |
} | |
@media screen and (min-width: 600px) { | |
.grid { | |
display: flex; | |
flex-wrap: wrap; | |
flex-direction: row; | |
} | |
.grid .cell { | |
width: calc(50% - 2rem); | |
} | |
} | |
@media screen and (min-width: 1000px) { | |
.grid .cell { | |
width: calc(33.3333% - 2rem); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment