Last active
April 12, 2021 15:27
-
-
Save A973C/a4db635daf67a8b2619fd995c7ed6943 to your computer and use it in GitHub Desktop.
CSS Grid 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
<header>header</header> | |
<nav>nav</nav> | |
<section>section</section> | |
<aside>aside</aside> | |
<footer>footer</footer> |
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
body { | |
font-family: segoe-ui_normal,Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif; | |
display: grid; | |
grid-template-areas: | |
"header header header" | |
"nav section aside" | |
"footer footer footer"; | |
grid-template-rows: 80px 1fr 50px; | |
grid-template-columns: 15% 1fr 18%; | |
grid-gap: 5px; | |
height: 100vh; | |
margin: 10px; | |
} | |
header { | |
background: #707070; | |
grid-area: header; | |
} | |
nav { | |
background: #C9BFBF; | |
grid-area: nav; | |
} | |
section { | |
background: #ABABAB; | |
grid-area: section; | |
} | |
aside { | |
background: #C9C9C9; | |
grid-area: aside; | |
} | |
footer { | |
background: #707070; | |
grid-area: footer; | |
} | |
header, nav, section, aside, footer { | |
padding: 5px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment