- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Flex items alignment, align-items</title>
<link href="course.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="house">
<div class="room">
<div class="rug rudolf"></div>
<div class="rug muffin"></div>
<div class="rug simba"></div>
</div>
</body>
</html>
CSS
.room {
display: flex;
justify-content: center;
align-items: stretch;
}
.rug {
}
.rug.muffin {
}
You’ve gone to a different page
Goalscompleted
0
- Assign the height
150px
to the rugs (.rug
), - and then assign the flex item alignment for the
.room
block to the center of the cross axis, - and then assign the height
250px
to Muffin’s rug (.muffin
).
Comments