Tribute Page - Build a Tribute Page

Hi there first time posting. So I’m having trouble with some of the tests when trying to run my code.
Here they are:

  • Your img element should have a display of block .

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

  • Your #image should be centered within its parent.

However the weird thing is that this one is passing.

  • Your #image should have a height of auto .

What am I doing wrong?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Roboute Tribute Page</title>
    <link rel="stylesheet" href="style.css">
  </head>
  <body>
    <main id="main">
      <h1 id="title">Roboute Guilliman</h1>
      <p>Primarch of the Ultramarines</p>
      <figure id="img-div">
        <img id="image" src="https://cdn.vox-cdn.com/thumbor/rH8l1PzkEDlj6Fa2fE4Tn-dmvHI=/0x0:1200x656/920x613/filters:focal(504x232:696x424):format(webp)/cdn.vox-cdn.com/uploads/chorus_image/image/71900018/Warhammer_40000_SM_Gallery_Art_3_1200x800.0.jpg">
        <figcaption id="img-caption">Here he is standing with probably an inquistorial type character and a Grey Knight, probably leadership. </figcaption>
        </figure>
        <h3>Brief history of Roboute Guilliman</h3>
        <ul>
          <li>Roboute Guilliman was born on the planet Macragge in the Ultima Segmentum during the early years of the Great Crusade.</li>
          <li>He was the primarch of the Ultramarines, one of the original twenty Primarchs created by the Emperor of Mankind.</li>
          <li>Guilliman possessed exceptional leadership abilities and tactical acumen, which made him one of the most effective Primarchs during the Great Crusade.</li>
          <li>He played a crucial role in expanding the Imperium of Man, leading the Ultramarines to conquer numerous worlds and establish the Ultramarines' realm, Ultramar.</li>
          <li>Guilliman developed the Codex Astartes, a comprehensive doctrine for organizing and deploying Space Marine chapters, which became the standard for the Imperium's military operations.</li>
          <li>During the Horus Heresy, Guilliman remained loyal to the Emperor while many of his brother Primarchs turned traitor. He fought against Horus and his traitor forces.
Despite his efforts, Guilliman was critically wounded by the traitor Primarch Fulgrim and put into stasis to heal his injuries.</li>
          <li>Guilliman's stasis lasted for over 10,000 years until the 13th Black Crusade, when the events of the Gathering Storm unfolded.</li>
          <li>He was revived by the Eldar deity Ynnead and returned to the Imperium at a time of great turmoil known as the "Dark Imperium."</li>
          <li>Guilliman assumed the role of Lord Commander of the Imperium, aiming to restore order, rebuild the Imperium, and fight against the myriad threats it faces.</li>
          <li>He reorganized the Imperium's military forces, established the Indomitus Crusade, and launched a massive offensive against Chaos, seeking to reclaim lost territory and defeat the forces of the Great Rift.</li>
          <li>Guilliman's return has had a significant impact on the Imperium, reinvigorating the forces of the Imperium and renewing hope for humanity's survival in a dark and grim future.</li>
</ul>
<section id="tribute-info">
         <h3> If this info tickled your fancy, here is his <a id="tribute-link" href="https://wh40k.lexicanum.com/wiki/Roboute_Guilliman" target="_blank">Lexicanum page</a></section>
         </main>
  </body>
</html>
/* file: styles.css */
html {
  font-size: 12px; 
}

main {
  text-align: center;
  display: block;
}
h1{
  text-align: center;
}
img{
  display:block;
}
#image {
  max-width: 100%;
  height:auto;
  margin:0 auto;
}

li{
  margin: 2px auto;
}


Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

Hello there. Welcome to the forums. These tests pass for me, and I think the problem is the link to your css file. In your html head tag, you have style.css but the css file is styles.css. The s makes that distinction. Hope this solves your problem.

2 Likes

Oof Thank you very much. That was it.

1 Like

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