I'm having issues with using named lines in grid for layout. The red section is not positioning correctly next to the footer, and I can't figure out where I went wrong.
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.container {
height: 100vh;
display: grid;
grid-template-columns: [header-start content-start footer-start] 4fr [content-end footer-end section-start] 1fr [header-end section-end];
grid-template-rows: [header-start] 1fr [hrader-end content-start] 3fr [content-end footer-start] 1fr [footer-end];
gap: 10px;
padding: 10px;
}
header {
grid-column: header-start / header-end;
background-color: blanchedalmond;
}
.content {
grid-column: content-start / content-end;
background-color: skyblue;
}
section {
grid-column: section-start / section-end;
background-color: coral;
}
footer {
grid-column: footer-start / footer-end;
background-color: lightseagreen;
}
/*centering*/
.content,
header,
section,
footer {
display: flex;
justify-content: center;
align-items: center;
}
<html lang="en">
<head>
<meta charset="UTF-8>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="grid2.css">
<title>grid-line</title>
</head>
<body>
<div class="container">
<header class="header">
HEADER
</header>
<div class="content">
CONTENT
</div>
<section class="text">
TEXT
</section>
<footer class="footer">
FOOTER
</footer>
</div>
</body>
</html>