Tell us what’s happening:
how do I center my img within its parent please?
Your code so far
<!-- file: index.html -->
<main id="main">
<h1 id="title">Dr.Norman Borlaug</h1>
<div id="img-div">
<img id="image"></img>
<div id="img-caption">Dr. Norman Borlaug</div>
</div>
<e id="tribute-info">Dr.Norman's tribute</e>
<a id="tribute-link" href="https://tribute-page.freecodecamp.rocks" target="_blank">click here for more info<a/>
<link rel="stylesheet" href="styles.css">
</main>
/* file: styles.css */
img{
display: block;
max-width: 100%;
height: auto;
justify-content: center;
width: 175px;
border-radius: 20%;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Challenge: Tribute Page - Build a Tribute Page
Link to the challenge: