Tribute Page - Build a Tribute Page

Tell us what’s happening:

In my css I’m trying to center the image inside the div. I thought my code was correct. What am I doing wrong?

Your code so far

<!-- file: index.html -->
<main id="main">
  <title id="title">Dr. Norman Borlaug</title>
  <link rel="stylesheet" href="styles.css">
  <div id="img-div">
    <img id="image" src="pic_trulli.jpg" alt="Italian Trulli"></img>
    <figcaption id="img-caption">Image Caption</figcaption>
    <p id="tribute-info">Tribute Info</p>
    <a href="" id="tribute-link" target="_blank"></a>
/* file: styles.css */


#img-div > img{      text-align: center;

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15

Challenge Information:

Tribute Page - Build a Tribute Page

You need margin property to center a element. You should use margin property value to 0 auto.