Tribute page project

#image {
  max-width: 100%;
  height: auto;
  justify-content: center;
  align-items: center;
  display: 
}
#img-div {
text-align: center;
margin: 0 auto; 
max-width: 100%; 
height: auto;
}
  
 <figure id="img-div">
<img id="image" src="https://en.wikipedia.org/wiki/Malcolm_X#/media/File:Malcolm_X_NYWTS_2.jpg"></img>
<figcaption id="img-caption">Malcom X during a speech</figcaption>
    </figure>

Your #image should be centered within its parent.

how do center image within its parent?

Hi there! To center an inline element like an image all you need is text-align: center, set to your #img-div
Also, image link seems to be broken

1 Like