Tribute Page - Build a Tribute Page

Tell us what’s happening:
Hi, I’m trying to set my img element to have a display of block and my #image ID to a max-width of 100%, but I think I’m not getting something right as it’s not working. I don’t see any provision to write my css in an external file, so I don’t know how to target those two elements separately. Help, please ?Thanks

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
  <title>Tribute Page Test</title>
  <link rel="stylesheet" href="styles.css">
  <main id="main">
    <h1>Nelson Mandela</h1>
    <p id="title">The man who saved a million South-African  lives</p>
    <div id="img-div">
      <img src="" id="image" height="auto" width="100%" display="block">
      <figcaption id="img-caption">The day Nelson Mandela walked out of prison</figcaption>
      <p id="tribute-info">
        Nelson Mandela, in full Nelson Rolihlahla Mandela, byname Madiba, (born July 18, 1918, Mvezo, South Africa—died December 5, 2013, Johannesburg), Black nationalist and the first Black president of South Africa (1994–99). His negotiations in the early 1990s with South African Pres. F.W. de Klerk helped end the country’s apartheid system of racial segregation and ushered in a peaceful transition to majority rule. Mandela and de Klerk were jointly awarded the Nobel Prize for Peace in 1993 for their efforts.
      <p>Here is a link to read more about <a href="" id="tribute-link" target="_blank">Nelson Mandela</a></p>

/* file: styles.css */

  **Your browser information:**

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

I just noticed after submitting this question that all my inline styling was removed. Where am I supposed to write my css ?

There’s a separate file for the stylesheet in styles.css. Be sure to link to it in the head of the document.

 <link rel="stylesheet" href="styles.css">

click on styles.css tab to open editor for css file

I linked it, but where do I actually write the codes?

Oh! thank you! I’ll do this now.

Hi. I Can’t seem to find it on the page. Where do I look,please ?

there are links for index.html and styles.css files to edit them on top left side of the page

Thank you so much. I had to reload the page to see the links. I really appreciate the help.

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