<header>
Header Section
</header>
<aside>
Aside Section
</aside>
<main>
Main Section
</main>
<footer>
Footer Section
</footer>
<section> Section Content</section>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
min-height: 100vh;
font-family: "Exo", Arial, sans-serif;
background-color: #f7f7f7;
}
body {
display: grid;
gap: 10px;
grid-template-rows: min-content auto min-content;
grid-template-columns: repeat(12, 1fr);
grid-template-areas:
"header header header header header"
"aside aside main main main"
"footer footer footer footer footer";
}
body > * {
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
header {
background-color: #040f17;
min-height: 88px;
/* ①: grid-area: header; */
/* ②: grid-area: header-start / header-start / header-end / header-end; */
grid-row: header-start / header-end;
grid-column: header-start / header-end;
}
aside {
background-color: #09f;
/* ①: grid-area: aside; */
/* ②: grid-area: aside-start / aside-start / aside-end / aside-end; */
grid-row: aside-start / aside-end;
grid-column: aside-start / aside-end;
}
main {
background-color: #ff5722;
/* ①: grid-area: main; */
/* ②: grid-area: main-start / main-start / main-end / main-end; */
grid-rows: main-start / main-end;
grid-column: main-start / main-end;
}
footer {
background-color: #3f51b5;
min-height: 100px;
/* ①: grid-area: footer; */
/* ②: grid-area: footer-start / footer-start / footer-end / footer-end; */
grid-rows: footer-start / footer-end;
grid-column: footer-start / footer-end;
}
section {
grid-area: header-start / header-end / -1 / -1;
background-color: #e91e63;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.