Image tribute page

I am new to coding working on the legacy responsive webpage project and can’t get image to work, although it says my height of auto is correct. My full code and instructions below:

Your img element should have a display of block

Your #image should have a max-width of 100%

Your #image should have a height of auto

Your #image should be centered within its parent

Html code:

<style>
body{
 
 font-family: calibri;
}

</style>
<main id="main">


<h1 id="title">Tyler, the Creator</h1>

<figure id="img-div">

<img id="image" src="https://images.fastcompany.net/image/upload/w_1280,f_auto,q_auto,fl_lossy/wp-cms/uploads/2018/10/p-2-a-creator-in-bloom-FA1118TYLE001.jpg" alt="Tyler, the Creator posing">

<figcaption id="img-caption">
Tyler, the Creator c. 2017
 </figcaption>
</figure> 

<div id="info">
  <div id="tribute-info">
    <p>
      Tyler Gregory Okonma, professionally known as Tyler, the Creator, is an American rapper and record producer. Following a large contribution to Odd Future's early work, Tyler released his debut solo mixtape, Bastard, in 2009.After releasing his debut studio album, Goblin, via XL Recordings in April 2011, he signed a joint deal with RED Distribution and Sony Music Entertainment for himself and his label, Odd Future Records.</p>

    
   </div>
   <a href="https://www.fastcompany.com/90245399/a-creator-in-bloom" id="tribute-link" target="_blank">
   <div class="out">
     <div class="in">
       <p>LEARN MORE</p>
       </div>
       </div>
</div>
</main >

  </div>
  <a href="https://www.fastcompany.com/90245399/a-creator-in-bloom" id="tribute-link" target="_blank">
  <div class="out">
    <div class="in">
      <p>LEARN MORE</p>
      </div>
      </div>

Css code:
#image{
max-width: 100%;
height: auto;
display: block;

You forgot to close this with a curly brace }.

Also, keep in mind that your image needs to be centered within its parent. After these adjustments it may or may not be centered.

1 Like

Sorry for the late reply, but the curly brace is on there I just missed while copying and pasting to the forum and it is still wrong. is there anything else that I could have missed? sorry I am still all new to this

Hi @genraag !

Welcome to the forum!

Did you properly link your css to the html document?