My image isn't staying centered

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
<main id="main">
  <title id="title">Tim Berners-Lee</title>
  <h1>Tim Berners-Lee</h1>
  <p> The inventor of the World Wide Web.</p>
  <div id="img-div"><img id="image" src="https://webfoundation.org/docs/2019/03/TBL-at-Web-Summit_Letter.jpg"/><div id="img-caption">On the World Wide Web’s 30th birthday, our founder and web inventor Sir Tim Berners-Lee reflects on how the web has changed our world and what we must do to build a better web that serves all of humanity.</div></div>
  <section id="tribute-info">
    <h2>His profile</h2>
    <ul>
      <li><span>Born:</span> 8 June 1955 (age 67 years), London, United Kingdom</li>
      <li><span>Awards:</span> Millennium Technology Prize, The President's Medal, MORE</li>
      <li><span>Spouse:</span> Rosemary Leith (m. 2014), Nancy Carlson (m. 1990–2011)</li>
      <li><span>Education:</span> The Queen's College (1973–1976), Emanuel School (1969–1973), Sheen Mount Primary School</li>
      <li><span>Children:</span> Ben Berners-Lee, Alice Berners-Lee</li>
      <li><span>Parents:</span> Conway Berners-Lee, Mary Lee Woods</li>
  </section>
  <h3>If you have time, you should read more about this incredible human being on his
  <a id="tribute-link" target="_blank" href="https://en.wikipedia.org/wiki/Tim_Berners-Lee"> Wikipedia entry.</a>
  </h3>
</main>
</body>
</html>
/* file: styles.css */
img {
display: block;
max-width: 100%;
height: auto;
align: center;
}

html {
font-family: Courier New;
background-color: #bbb9b9f7;
}

h1, h2, h3, p {
text-align: center
}

div {
padding: 10;
background-color: #ffffff;
text-align: center;
img-align: center;
}
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Challenge: Build a Tribute Page

Link to the challenge:

1 Like

Hi @nihal2farooq and welcome!

I think this links will help you with your issue:

Well done and happy coding!