- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Perfect centering, margin: auto</title>
<link href="course.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="subtle">
<article class="item">
<h1>“Wolverine” Scratching Post</h1>
<div class="pictures">
<div class="picture">
<img src="img/toy.png" alt="">
</div>
<!-- copy the .picture element here -->
</div>
<div class="controls">
<a href="/">Buy</a>
</div>
</article>
</body>
</html>
CSS
.pictures {
}
.picture {
}
.picture img {
width: 80px;
}
You’ve gone to a different page
Goalscompleted
0
- Assign a flexbox layout to the
.pictures
block, - and then assign
margin: auto
for the.picture
block. - Change the size of the
.picture img
image to40px
, - and then add another
.picture
block with the same image in the HTML editor.
Comments