Tribute Page - Build a Tribute Page

Hello guys,
working on the second project. I have some error messages and dont know how to solve them. I tried some things but nothing worked.

cheers

error messages:

  • Failed: Your img element should have a display of block.
    our #image should have a max-width of 100%.
  • Failed: Your #image should have a height of auto.
    Your #image should be centered within its parent.
<!-- file: index.html -->
 <!DOCTYPE html>
<html>
<head>
  <title id="title">Zlatan Ibrahimovic</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<main id="main">
  <figure " id="img-div">
    <img id="image" src="https://images.sportschau.de/image/e80b0e6a-bc47-44d3-8712-8fc5cd7ad5fc/AAABgRIhlWM/AAABg8tMMaM/1x1-1400/zlatan-ibrahimovic-heroisch-100.jpg" max-width="300" height="300" /> 
<figcaption id="img-caption">Zlatan.</figcaption>
<a id="tribute-link" href="https://www.transfermarkt.de/zlatan-ibrahimovi%C4%87/profil/spieler/3455"target="_blank"> Transfermarkt profile </a>
<p id="tribute-info">Zlatan</p>
    </figure>
</main>



</body>
</html> 

/* file: styles.css */
h1{
  color:blue;
}



#img{
  display:block;
  max-width:100%;
  height:auto;
  text-align:center;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

Your img is an element not an id. So you don’t need to use # in your CSS.
You can read more about selector in this thread.

1 Like

thank you Sir! It work now

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