- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Grid item overlay</title>
<link href="world.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="world">
<div class="land land--guided">
<div class="element element--grass">Grass</div>
<div class="element element--water">Water</div>
<div class="element element--rocks">Rocks</div>
</div>
</body>
</html>
CSS
.land {
display: grid;
grid-template-columns: 125px 125px 125px 125px;
grid-template-rows: 125px 125px 125px 125px;
}
You’ve gone to a different page
Goalscompleted
0
- Assign column and row grid item coordinates of
1
to-1
for the.element--grass
block so that the block occupies the entire grid. - Assign the grid item coordinates for column lines
1
to4
and row lines2
to4
for the.element--water
block. - Assign the grid item coordinates for column lines
2
to3
and for the rows from the first line to the first line counted from the end for the.element--rocks
block.
Comments