Tribute Page - Build a Tribute Page

Tell us what’s happening:

i have changed the link but the selector doesnt even respondinng

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">
    <link rel="stylesheet" href="style.css">
    <title>Mohammed Ali Tribute</title>
  </head>
  <body>
    <main id="main">
      
      <h1 id="title">Muhammad Ali</h1>


      <div id="img-div">
        <img id="image" src="https://images.app.goo.gl/LczWEbRHc2jQFNtw9" alt="Muhammad Ali vs. Cassius Clay Fight">
        <div id="img-caption">The famous fight between Muhammad Ali and Sonny Liston.</div>
      </div>

      
      <section id="tribute-info">
        <p><i>Muhammad Ali, originally known as Cassius Clay, is widely regarded as one of the greatest boxers of all time. Known for his quick footwork, powerful punches, and charismatic personality, Ali's victory over Sonny Liston in 1964 marked the beginning of a legendary career.</i></p>
      </section>

      
      <a id="tribute-link" href="https://en.wikipedia.org/wiki/Muhammad_Ali" target="_blank">Learn more about Ali</a>
    </main>
  </body>
</html>

/* file: styles.css */
image{
  display: block;
  max-width: 100%;
  margin: 0;
}

Your browser information:

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

Challenge Information:

Tribute Page - Build a Tribute Page

Hi there!
Your #image should use max-width and height properties to resize responsively, relative to the width of its parent element, without exceeding its original size
Your img element should be centered within its parent element.

You aren’t using the #image selector.
Also you have margin set to value 0, so the image haven’t be centered within it’s parent element.

1 Like

this is not a valid selector as there isn’t an <image> tag. What’s the correct element name? look at your html

can you pls look up i think it must be the div to be used as an selector ig

I mean what’s the html name of an image element

image i have it image

You have it image, but as a id attribute value. How did you target an id value as a css selector?

yaaahh youre right bt really i didnt noticed it thank you so much brother

2 Likes

You’re most welcome. Happy Coding

1 Like