- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Named grid areas: the grid-template-areas property</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--water"></div>
<div class="element element--grass"></div>
<div class="element element--rocks"></div>
<div class="element element--lava"></div>
</div>
</body>
</html>
CSS
.land {
display: grid;
}
You’ve gone to a different page
Goalscompleted
0
- Assign the following grid structure for the
.landblock using thegrid-template-areasproperty:"w w l l""w w l l""g g l l""r r r r" - Assign the corresponding grid areas for the element grid using the
grid-areaproperty:
for.element--waterassign characterw;
for.element--grassassign characterg;
for.element--lavaassign characterl;
for.element--rocksassign characterr.
Comments