0
body {
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: white;
}
div.container {
display: grid;
grid-template-columns: 3fr 1fr;
grid-template-rows: 20vh 70vh 10vh;
grid-template-areas: "h h" "m a" "f f";
}
header {
background: yellow;
grid-area: h;
}
main {
background: blue;
grid-area: m;
}
aside {
background: green;
grid-area: a;
}
footer {
background: red;
grid: f;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Site</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<header></header>
<main></main>
<aside></aside>
<footer></footer>
</div>
</body>
</html>
I’m learning CSS-Grid and can’t figure out why the footer doesn’t occupy the 4 columns created, just the first 3. Can anyone help me, Prf?