- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Alignment and margins</title>
<link href="course.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="world">
<div class="spot">
<div class="skate skate-1 racoon-green"></div>
<div class="skate skate-2 racoon-brown"></div>
<div class="skate skate-3 racoon-orange"></div>
</div>
</body>
</html>
CSS
.spot {
display: flex;
align-items: center;
justify-content: space-around;
}
.skate {
margin: 10px;
min-width: 50px;
min-height: 50px;
}
.skate-2 {
}
.skate-3 {
}
You’ve gone to a different page
Goalscompleted
0
- Change the alignment of flex items for
.spot
along the cross axis tostretch
. - Then assign
margin-top: auto;
to the second skateboard. - First set a custom alignment to the end of the cross axis for the third skateboard,
- and then assign
margin-bottom: auto;
.
Comments