Created
February 14, 2018 21:57
-
-
Save KMontag42/20e89c6effece3ef4e7cbc0f437687b2 to your computer and use it in GitHub Desktop.
simple css grid holy grail layout
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
#grid { | |
display: grid; | |
box-sizing: border-box; | |
width: 100vw; | |
height: 100vh; | |
grid-template-columns: | |
[start] minmax(auto, min-content) | |
[center] auto | |
[end] minmax(auto, min-content); | |
grid-template-rows: | |
[header] 2em | |
[middle] auto | |
[footer] 2em; | |
padding: 0; | |
grid-column-gap: 1px; | |
grid-row-gap: 1px; | |
background-color: #333; | |
} | |
.start { grid-column-start: start; } | |
.center { grid-column-start: center; } | |
.end { grid-column-start: end; } | |
.header { grid-row-start: header; } | |
.middle { grid-row-start: middle; } | |
.footer { grid-row-start: footer; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment