example grid
Last active
April 8, 2018 02:00
-
-
Save iSergius/9d1497b19fd7f74339584600d04b491e to your computer and use it in GitHub Desktop.
Grid
This file contains hidden or 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
<div class="page"> | |
<header class="header"> | |
Header | |
</header> | |
<aside class="sidebar-first"> | |
Sidebar First | |
</aside> | |
<aside class="sidebar-second"> | |
Sidebar Second | |
</aside> | |
<div class="content"> | |
Content | |
</div> | |
<footer class="footer"> | |
Footer | |
</footer> | |
</div> |
This file contains hidden or 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
.page > * { | |
border: 1px solid; | |
text-align: center; | |
} | |
.page { | |
display: grid; | |
grid-template-colums:1fr 1fr 1fr 1fr; | |
grid-template-rows:1fr 1fr 1fr 1fr; | |
grid-gap: 10px; | |
grid-template-areas: | |
"header header header header" | |
"sidebar-first content content sidebar-second" | |
"sidebar-first content content sidebar-second" | |
"footer footer footer footer"; | |
} | |
.header { | |
grid-area: header; | |
} | |
.sidebar-first { | |
grid-area: sidebar-first; | |
} | |
.sidebar-second { | |
grid-area: sidebar-second; | |
} | |
.content { | |
grid-area: content; | |
} | |
.footer { | |
grid-area: footer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment