Tribute Page - Build a Tribute Page

Hi everyone, so for whatever reason it won’t let me pass on the basis of the last three conditions:

  • Failed:Your img element should have a display of block.

  • Failed:Your #image should have a max-width of 100%.

  • Failed:Your #image should be centered within its parent.

I’m not sure if it’s an HTML problem OR if it’s a CSS problem. I have tried using img, image. #image, but for whatever reason, it won’t pass at least the display -block.

Any pointers in the right direction would be helpful. Thank you.

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

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
     <link rel="stylesheet" href="style.css">
  </head>
  <body>
    <main id='main'>
      <p id='title'>Dr.Norman Bates</p>
      <div id='img-div'> 
        <img src='https://static.wikia.nocookie.net/psycho/images/6/63/NormanProfile.jpg/revision/latest?cb=20171003045414' alt='norman bates' id='image'/> 
        <figcaption id='img-caption'>HERES JOHNNY! DAVID LETTERMAN! Hi David I'm Grandpa! </div>
      </div>
      <p id='tribute-info'> 
        
He won't take no for an answer
He will take your life
      
</p>

       <a href='https://psycho.fandom.com/wiki/Norman_Bates?file=NormanProfile.jpg' id='tribute-link' target='_blank'> Visit this page here </a>
    
    </main>
</body>
</html>
/* file: styles.css */
#image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}

Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

You have to link to styles.css.
Your code is:
image

1 Like

Edit: Never mind was in the wrong place. Thank you so much!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.