Tell us what’s happening:
I would like to know what is the best way to align the image in the center
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scalE=1.0">
<title>Cormac McCarthy</title>
</head>
<body>
<div class="a1">
<h1>Cormac McCarthy</h1>
</div>
<div class="a2"><h2>The man who wrote Blood Meridian
</h2></div>
<div class="a3">
<img src="https://cloudfront-us-east-1.images.arcpublishing.com/dmn/2RSJMUDIPRAOLOLR6C236PW2OI.jpg">
</div>
</body>
</html>
/* file: styles.css */
.a1{
text-align:center;
padding-top:5px;
padding-bottom:5px;
background-color:#8B4513;
font-family:georgia;
}
.a2{
text-align:center;
font-size:10;
}
.a3 img{
width:50%;
height:auto;
;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Challenge Information:
Tribute Page - Build a Tribute Page