- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Features of the margin property</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 class="skate skate-4 racoon-gray"></div>
</div>
</body>
</html>
CSS
.spot {
display: flex;
align-items: center;
justify-content: flex-start;
}
.skate {
margin: 0;
min-width: 40px;
min-height: 100px;
}
.skate-2 {
}
.skate-4 {
}
You’ve gone to a different page
Goalscompleted
0
- Set margins of
10px
on all side of the.skate
skateboards. - Then assign
margin-left: auto;
to the second skateboard, - and assign
margin-right: auto;
to the fourth skateboard. - Finally, change the allocation property for
.spot
along the main axis toflex-end
and make sure that nothing has changed.
Comments