Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A simple responsive grid using flexbox
.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
You can’t perform that action at this time.