Skip to content

Instantly share code, notes, and snippets.

@bendc
Last active December 15, 2017 19:50
Show Gist options
  • Save bendc/0193e99fa094baa7e4368b147e172c65 to your computer and use it in GitHub Desktop.
Save bendc/0193e99fa094baa7e4368b147e172c65 to your computer and use it in GitHub Desktop.
Holy Grail Layout using CSS Grid
<!doctype html>
<title>Holy Grail Layout</title>
<style>
body {
display: grid;
grid-template-rows: 100px 1fr 100px;
grid-template-columns: 200px 1fr 200px;
min-height: 100vh;
margin: 0
}
header, footer {
grid-column-end: span 3
}
main {
grid-column-start: 2
}
nav {
grid-row-start: 2
}
aside {
grid-column-start: 3
}
</style>
<header></header>
<main></main>
<nav></nav>
<aside></aside>
<footer></footer>
@mrflix
Copy link

mrflix commented Apr 7, 2016

@raphaelgoetter
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment