I CANT CENTER THE IMAGE WITH PARENT ELEMENT PLEASE HELP
Your code so far HTML
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>
CRISTIANO RONALDO TRIBUTE PAGEV
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="cristiano.css">
<link href="https://fonts.googleapis.com/css?family=Anton&display=swap" rel="stylesheet"rel="stylesheet">
</head>
<body id="bg">
<div id="main">
<h1 id="title">CR7STIANO RONALDO</h1>
<div id="img-div" class="center" >
<img src="https://wallpapercave.com/wp/wp5424846.jpg" id="image" alt="cristiano ronaldo dos santos aveiro">
<div id="img-caption">CRISTIANO RONALDO PORTUGUESE PLAYER AND THE GOAT</div>
<BR>
<p id="tribute-info">Cristiano Ronaldo dos Santos Aveiro GOIH ComM (European Portuguese: [kɾiŹĖtjÉnu ŹÉĖnaÉ«du]; born 5 February 1985) is a Portuguese professional footballer who plays as a forward for Serie A club Juventus and captains the Portugal national team
Often considered the best player in the world and widely regarded as one of the greatest players of all time,[note 3] Ronaldo has won five Ballons d'Or[note 4] and four European Golden Shoes, both of which are records for a European player.
He has won 29 trophies in his career, including six league titles, five UEFA Champions Leagues, one UEFA European Championship, and one UEFA Nations League.
A prolific goalscorer, Ronaldo holds the records for the most goals scored in the UEFA Champions League (128) and the joint-most goals scored in the UEFA European Championship (9).
He has scored over 700 senior career goals for club and country.[11]</p>
<br>
<a href="https://en.wikipedia.org/wiki/Cristiano_Ronaldo" target="_blank" id="tribute-link">CLICK HERE FOR MORE</a>
</div>
</div>
</body>
</html>
CSS:
main{
font-family: 'Anton',sans-serif;
}
h1{
background-color: #002851;
color:white ;
text-align: center;
}
#image-div{
background-color: #DBDBDB;
padding: 30px 10px 10px 50px;
margin: auto;
opacity: 0.8;
text-align: center;
}
#image{
max-width: 90%;
display: block;
height: auto;
text-align: center;
align-content:center;
#img-caption{
font-family: monospace;
text-align:center;
}
#tribute-info{
font-family: 'Anton',sans-serif;
}
#bg{
background-image: url("https://wallpapercave.com/wp/wp2736312.jpg");
}
#tribute-link{
font-family: sans-serif;
background-color: teal;
color: tomato;
}
.center{
display:block;
text-align:center
}