Created
February 27, 2019 18:34
-
-
Save miklb/ac7584e47592b2aadc28a8be4a86a859 to your computer and use it in GitHub Desktop.
basic css grid
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
.site-header { | |
grid-area: header; | |
} | |
.site-content { | |
grid-area: content; | |
} | |
.widget-area { | |
grid-area: sidebar; | |
} | |
.site-footer { | |
grid-area: footer; | |
} | |
.site { | |
background: #000; | |
color: #fff; | |
width: 100%; | |
max-width: 960px; | |
margin: 0 auto; | |
display: grid; | |
grid-row-gap: 10px; | |
grid-template-areas: | |
"header" | |
"content" | |
"sidebar" | |
"footer"; | |
} | |
@media (min-width: 550px) { | |
.site { | |
grid-column-gap: 2em; | |
grid-row-gap: 20px; | |
grid-template-columns: 2fr 4fr; | |
grid-template-areas: | |
"header header" | |
"content content" | |
"footer footer" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment