- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test: Building bridges</title>
<link href="world.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="world world--exam">
<div class="land land--rectangle land--guided">
<div class="element element--water">Water</div>
<div class="element element--grass element--top-left">Grass</div>
<div class="element element--grass element--top-right">Grass</div>
<div class="element element--grass element--bottom-left">Grass</div>
<div class="element element--grass element--bottom-right">Grass</div>
<div class="element element--bridge element--bridge-1">Bridge</div>
<div class="element element--bridge element--bridge-2">Bridge</div>
<div class="element element--bridge element--bridge-3">Bridge</div>
<div class="element element--bridge element--bridge-4">Bridge</div>
</div>
</body>
</html>
CSS
.land {
display: grid;
grid-template-columns: 60px 60px 60px 60px 60px 60px 60px 60px 60px 60px;
grid-template-rows: 40px 40px 40px 40px 40px 40px 40px 40px 40px 40px;
}
.element--water {
grid-column: 1 / -1;
grid-row: 1 / -1;
}
.element--top-left {
grid-column: 2 / 4;
grid-row: 2 / 5;
}
.element--top-right {
grid-column: 8 / -2;
grid-row: 1 / -8;
}
.element--bottom-left {
grid-column: 9 / -1;
grid-row: 8 / -1;
}
.element--bottom-right {
grid-column: 3 / 7;
grid-row: -2 / -5;
}
.element--bridge-1 {
}
.element--bridge-2 {
}
.element--bridge-3 {
}
.element--bridge-4 {
}
- Goal
- Result
- Overlay
- Differences
- ?
Press Compare to send your code for review.