**Well, I can’t solve this requirement: “Your #image
should be centered within its parent.”
Tried to use 2 methods to center #image, but they fail to satisfy the requirement. What do I do? **
it looks the same in my opinion
Here is my code:
css
#img-div{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#image{
max-width: 100%;
min-width: 450px;
display: block;
height: auto;
margin: 0 auto 15px;
}
html
<figure class="img-container" id="img-div">
<img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute-page-main-image.jpg" class="img" id="image">
<div id="img-caption"><p class="text centered">Dr. Norman Borlaug, third from the left, trains biologists in Mexico on how to increase wheat yields - part of his life-long war on hunger.</p></div>
</figure>
Challenge: Tribute Page - Build a Tribute Page
Link to the challenge: