I want to make a grid layout which looks like this:
"sidebar header header header header"
"sidebar content content content content"
"footer footer footer footer footer"
I try to do that with the following code:
HTML :
<main>
<section class = "header"></section>
<aside class = "sidebar"></aside>
<section class = "content"></section>
<section class = "footer"></section>
</main>
CSS:
.header {
background-color: red;
grid-area: header;
}
.sidebar {
background-color: blue;
grid-area: sidebar;
}
.content {
background-color: yellow;
grid-area: content;
}
.footer {
background-color: green;
grid-area: footer;
}
main {
display: grid;
grid-template-columns: 50px 1fr 1fr 1fr 1fr;
grid-template-rows: 100px 1fr 100px;
grid-template-areas: "sidebar header header header header"
"sidebar content content content content"
"footer footer footer footer footer";
}
However, when I try to run my code, the yellow content is not showing up.
Here is the JSFiddle with the code : https://jsfiddle.net/wd0k5b4r/