Can not find where i went wrong in the challenge everything passes but the img css

doing the tribute challenge css styling not working cant figure out where i went wrong i run the test and everything passes but the ones where img need a display of block
max-width 100% and center with its parent all code so far should be below

  **Your code so far**
/* file: index.html */
<!DOCTYPEhtml>
<html><head link rel="stylesheet" href="styles.css"></head>
<body><main id = "main">
  <h1 id = "title">Pubg Tribute</h1>
  <p>the players who never left</p>
  <figure id = "img-div">
    <img id = "image" src = "https://th.bing.com/th/id/OIP.hBJO0wp5_t-n7U7WZh67JAHaEL?pid=ImgDet&rs=1" alt = "pubg charters">
    
    <figcaption id = "img-caption">pubg content
</figcaption>
</figure>

<section id = "tribute-info">
<h2 id = "headline">A list of content creators still going strong</h2>
<ul>
  <li>Dancud</li>
  <li>ChocoTaco</li>
  <li>Halifax</li>
  <li>Hambinoo</li>
  <li>Corcky</li>
  <li>GaGod</li>
  </ul>
  
  
  <a id = "tribute-link" href = "https://www.twitch.tv/directory/game/PUBG%3A%20BATTLEGROUNDS" target = "_blank">twitch diectory</a>
     </main>
    </section>
    
    </body>

    </html>
/* file: styles.css */
img{
display: block;
max-width: 100%;
height: auto;
margin: auto;
}

  **Your browser information:**

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

Challenge: Build a Tribute Page

Link to the challenge:

Hi, in this part of your code.

<!DOCTYPEhtml>
<html><head link rel="stylesheet" href="styles.css"></head>
<body><main id = "main">

the link element should not be in the head element’s opening tag.
also doctype should have the correct syntax, and lastly try having cleaner code it’ll help you understand your code better when you search for bugs. :slight_smile:

1 Like

oh boy thank you i can’t believe i didn’t catch that such a simple fix and right at the beginning i should have known since it was only the css not working thank you !!!

1 Like