Created
November 14, 2018 05:31
-
-
Save trooperandz/27d0aa8be7845976ab05d07ac92781a4 to your computer and use it in GitHub Desktop.
CSS Grid Dashboard Layout Base Styles
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
/* Simple dashboard grid CSS */ | |
/* Assign grid instructions to our parent grid container */ | |
.grid-container { | |
display: grid; | |
grid-template-columns: 240px 1fr; | |
grid-template-rows: 50px 1fr 50px; | |
grid-template-areas: | |
"sidenav header" | |
"sidenav main" | |
"sidenav footer"; | |
height: 100vh; | |
} | |
/* Give every child element its grid name */ | |
.header { | |
grid-area: header; | |
background-color: #648ca6; | |
} | |
.sidenav { | |
grid-area: sidenav; | |
background-color: #394263; | |
} | |
.main { | |
grid-area: main; | |
background-color: #8fd4d9; | |
} | |
.footer { | |
grid-area: footer; | |
background-color: #648ca6; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment