<!-- Learned from https://dev.to/mustapha/css-grid-illustrated-introduction-52l5 -->
<div class="grid-container">
<div class="grid-item header">Header</div>
<div class="grid-item content">Content</div>
<div class="grid-item navbar">Navbar</div>
<div class="grid-item meta">Meta</div>
<div class="grid-item footer">Footer</div>
</div>
.grid-container {
width: 500px;
height: 400px;
text-align: center;
border: 1.5px solid var(--text-color);
display: grid;
grid-template-rows: repeat(6, 1fr);
grid-template-columns: 1fr 1fr [navbar-end content-start] repeat(10, 1fr);
grid-template-areas:
'h h h h h h h h h h h h'
'n n c c c c c c c c c c'
'n n c c c c c c c c c c'
'n n c c c c c c c c c c'
'n n c c c c c c c c c c'
'n n f f f f f f f f f f';
gap: 2px;
}
.grid-item {
border: 1.5px solid var(--text-color);
}
.grid-container .header {
grid-area: h;
/* grid-column: 1/-1;
grid-row: 1/2; */
}
.grid-container .navbar {
grid-area: n;
/* grid-column: 1/navbar-end;
grid-row: 2/-1; */
}
.grid-container .footer {
grid-area: f;
/* grid-column: content-start/-1;
grid-row: -2/-1; */
}
.grid-container .meta {
grid-column: -3 / -1;
grid-row: 2 / 4;
}
.grid-container .content {
grid-area: c;
/* grid-column: content-start/-2;
grid-row: 2/-2; */
}
:root {
--bg-color: #3057e1;
--text-color: #fefefe;
}
body,
html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background: var(--bg-color);
color: var(--text-color);
overflow-x: hidden;
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
position: relative;
font-size: 24px;
display: flex;
justify-content: center;
align-items: center;
}
body::before {
pointer-events: none;
content: '';
position: absolute;
width: 100%;
height: 100%;
opacity: 0.18;
background-size: 50px 50px;
background-image: linear-gradient(
transparent 0%,
transparent 98%,
var(--text-color) 98%,
var(--text-color) 100%
),
linear-gradient(
90deg,
transparent 0%,
transparent 98%,
var(--text-color) 98%,
var(--text-color) 100%
);
}
This Pen doesn't use any external CSS resources.