Tribute Page Project Problem

Hello,

I am having trouble passing this test:

" Your #img-div , #image , #img-caption , #tribute-info , and #tribute-link should all be descendants of #main ."

All the other tests are OK.

Can you please help me and suggest what might be wrong? I cannot see any problem with this test.

Thank you so much

My code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="Nelson Mandela" />
    <title>Nelson Mandela</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <div class="hero">
    <main id="main">
      <h1 id="title">Nelson Mandela</h1>
      <h2>The man who fought against South African anti-apartheid <br/>and became president of South Africa<h2><br/>
      <a id="button" href="#tribute-info">Learn more</a>
    </div>
      <div id="tribute-info">
        <h3>About Nelson Mandela:</h3>
        <ul>
          <li><b>1918</b> - Mandela was born in the village of Mvezo in Umtata, then part of South Africa's Cape Province.</li>
          <li><b>1933</b> - Began his secondary education at Clarkebury Methodist High School in Engcobo. </li>
          <li><b>1939</b> - Mandela began work on a BA degree at the University of Fort Hare. </li>
          <li><b>1943</b> - Passed his BA exams, returned to Johannesburg to be a lawyer rather than become a privy councillor in Thembuland.</li>
          <li><b>1943</b> - Became involved in anti-colonial and African nationalist politics, joining the African National Congress (ANC).</li>
          <li><b>1944</b> - Co-founds the ANC Youth League (ANCYL).</li>
          <li><b>1948</b> - Elected national secretary of the ANCYL.</li>
          <li><b>1951</b> - Elected President of the ANCYL.</li>
          <li><b>1960</b> - A State of Emergency is imposed and he is among thousands detained. The ANC is banned.</li>
          <li><b>1962</b> - Leaves the country for military training and to garner support for the ANC. Sentenced to five years in prison for incitement and leaving the country without a passport.</li>
          <li><b>1963</b> - Sent to Robben Island. Returned to Pretoria Local Prison. Appears in court for the first time in what becomes known as the Rivonia Trial.</li>
          <li><b>1964</b> - Sentenced to life. Arrives on Robben Island.</li>
          <li><b>1985</b> - Rejects, through his daughter, Zindzi, South African President PW Botha's offer to release him if he renounces violence. </li>
          <li><b>1990</b> - ANC is unbanned. Mandela is released from prison and elected ANC Deputy President. </li>
          <li><b>1993</b> - Awarded the Nobel Peace Prize with President FW de Klerk. </li>
          <li><b>1994</b> - Elected by Parliament as first president of a democratic South Africa. </li>
          </ul>
          <figure id="img-div">
        <img id="image" src="https://www.ft.com/__origami/service/image/v2/images/raw/http%3A%2F%2Fcom.ft.imagepublish.upp-prod-eu.s3.amazonaws.com%2Fd2c99cdc-70a7-11e9-bf5c-6eeb837566c5?dpr=2&fit=scale-down&quality=medium&source=next&width=700" alt="Photo of Nelson Mandela">
        <figcaption id="img-caption">Nelson Mandela takes the oath as president of South Africa in Pretoria on May 10 1994 © AFP <p id="small">(picture: <a id="img-link" href="https://www.ft.com/content/6c4dfd54-70a2-11e9-bf5c-6eeb837566c5" target="_blank">FINANCAL TIMES</a>)</p>
        </figcaption>
      </figure>
        <ul>
          <li><b>1995</b> - Establishes the Nelson Mandela Children's Fund.</li>
          <li><b>1999</b> - 	
Steps down after one term as President, establishes the Nelson Mandela Foundation.</li>
          <li><b>2004</b> - Announces that he will be stepping down from public life. </li>
          <li><b>2008</b> - 	Asks future generations to continue the fight for social justice.</li>
          <li><b>2011</b> - <b>2013</b> - Admitted to hospital & discharged from hospital.</li>
          <li><b>2013</b> - 	Passes away at home in Johannesburg.</li>
        </ul>
        <a id="button2" href="#main">Back to Top</a>
      </div>
      <seciton>
        <p id="end-info">All the information is from <a id="tribute-link" href="https://en.wikipedia.org/wiki/Nelson_Mandela" target="_blank">Wikipedia</a> and <a id="link2" href="https://www.nelsonmandela.org/content/page/timeline" target="_blank"> Nelson Mandela Foundation</a>.</p>
      </section>
    </main>
    <footer><p>Created by <a id="twitter" href="https://twitter.com/TerkaCodes" target="_blank">@TerkaCodeds</a></p>
    </footer>
  </body>
<html>

Challenge: Build a Tribute Page

Link to the challenge:

Put the
above the

1 Like

Put the main element above the div class hero

1 Like

Thank you so much, it worked. :grinning: I just have to completely redo my CSS because it messed up the whole layout, but I am happy you helped me :blush:

welcome :blush: :grinning: Happy coding!

1 Like