Tribute Page - Build a Tribute Page

Tell us what’s happening:

I am having trouble centering my #image within its parent

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
  <html lang="en">
   <meta charset="utf-8" />
   <link rel="stylesheet" href="styles.css"> 
<title id="title">Dr. Norman Borlaug </title>
    <main id="main">
      <div id="img-div">
        <img id="image" src="something" alt="picture">
        <figcaption id="img-caption">This is a picture </figcaption>
        <p id="tribute-info">This is a tribute page about Norma Borlaug </p>
        <a id="tribute-link" href="" target="_blank"></a>

/* file: styles.css */
body {
  font-family: sans-serif;
  margin: 0;

#main {
  text-align: center;
  padding: 20px;

#image {
  max-width: 100%;
  border: 2px solid lightblue;
  border-radius: 8px;
  padding: 200px;
  max-height: 500px;
  margin: auto;

img {
  display: block;

#img-div {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
#img-caption {
  margin-top: 10px;
  font-style: italic;

Your browser information:

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

Challenge Information:

Tribute Page - Build a Tribute Page

Hello @kleewhitfield !
If you give this ID a flex-direction of column, you’ll notice that the contents of your webpage align properly and to the center.