Skip to content

Instantly share code, notes, and snippets.

Created August 5, 2017 19:19
Show Gist options
  • Save anonymous/7a605eaaaecd86651458c6bc39eb8190 to your computer and use it in GitHub Desktop.
Save anonymous/7a605eaaaecd86651458c6bc39eb8190 to your computer and use it in GitHub Desktop.
CSS Grid - Header + Sidebar
<div class="container">
<div class="item item-1"></div>
<div class="item item-2"></div>
<div class="item item-3"></div>
</div>
body {
margin: 0px;
}
.container {
height: 100vh;
display: grid;
grid-template-columns: auto 300px;
grid-template-rows: 100px auto;
}
.item-1 {
grid-column: 1/3;
background-color: red;
}
.item-2 {
background-color: green;
}
.item-3 {
background-color: blue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment