A Pen by takanorioki on CodePen.
Created
October 13, 2016 12:57
-
-
Save takanorip/f2259b501e62c072e981466576325e8d to your computer and use it in GitHub Desktop.
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
<body> | |
<header>header</header> | |
<div class="holyGrail"> | |
<main class="content">HolyGrail</main> | |
<nav class="side-nav">nav</nav> | |
<aside class="side-bar">side</aside> | |
</div> | |
<footer>footer</footer> | |
</body> |
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 { | |
display: -webkit-flex; | |
display: flex; | |
margin: 0; | |
padding: 0; | |
min-height: 100vh; | |
flex-direction: column; | |
text-align: center; | |
} | |
header, | |
footer { | |
width: 100%; | |
padding: 2% 0; | |
font-size: 1.2rem; | |
color: #fff; | |
flex: 0; | |
} | |
header { | |
background: #006e54; | |
} | |
footer { | |
background: #727171; | |
} | |
.holyGrail { | |
display: flex; | |
flex: 1; | |
} | |
.content { | |
flex: 1; | |
} | |
.side-nav, | |
.side-bar{ | |
width: 200px; | |
background: #fddea5; | |
} | |
.side-nav { | |
order: -1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment