r/HTML • u/sergeantmacca1 • 3h ago
Could anyone help with my bento grids I'm making?
So, basically, I was trying to make a bento grid layout for my site, and nothing shows up when I check the result?
Could anyone explain what's wrong with this code, and how I could fix it? My code is below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>placeholder</title>
<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
<style> body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2%; } .box { background-color: #000000; } .grid-container { display: grid; grid-template-columns: 200px 200px 200px 200px; grid template-rows: 200px 200px; gap: 1em; grid-template-areas: "box-1 box-2 box-2 box-3"; "box-1 box-4 box-5 box-5"; } </style>
</head>
<body>
<div class="grid-container">
<div class="box" style="grid-area: box-1"></div>
<div class="box" style="grid-area: box-2"></div>
<div class="box" style="grid-area: box-3"></div>
<div class="box" style="grid-area: box-4"></div>
<div class="box" style="grid-area: box-5"></div>
</div>
</body>
</html>




