Project Tribunal Page - What am I missing?

Hi,

I am working on my first project in building a Tribunal Page. After many attempts to change the code I still can’t pass all the points. So far only 7/10. What am I missing here?

<!DOCTYPE html>
<main id="main>"
  <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
  <body>
    <div>
     <h1 id="title">Dr. Norman Borlaug</h1>
     <p>The man who saved a billion lives</p>
     </dv>
      
    <figure id="img-div">
      <img id="image" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute-page-main-image.jpg"><br><br>
      <figcaption id="img-caption">
        Dr. Norman Borlaug, third from the left, trains biologists in Mexico on how to increase wheat yields - part of his life-long war on hunger.
      </figcaption>
   </figure>
    
      <section id="tribute-info">
        <h3>Here's a time line of Dr. Borlaug's life:</h3>
        <ul>
          <li><strong>1914</strong> - Born in Cresco, Iowa</li><br>
          <li><strong>1933</strong> - Leaves his family's farm to   attend the University of Minnesota, thanks to a Depression era  program known as the "National Youth Administration"</li><br>
          <li><strong>1935</strong> - Has to stop school and save up more money. Works in the Civilian Conservation Corps, helping starving Americans. "I saw how food changed them", he said. "All of this left scars on me."</li><br>
          <li><strong>1937</strong> - Finishes university and takes a job in the US Forestry Service</li><br>
          <li><strong>1938</strong> - Marries wife of 69 years Margret Gibson. Gets laid off due to budget cuts. Inspired by Elvin Charles Stakman, he returns to school study under Stakman, who teaches him about breeding pest-resistent plants.</li><br>
          <li><strong>1941</strong> - Tries to enroll in the military after the Pearl Harbor attack, but is rejected. Instead, the military asked his lab to work on waterproof glue, DDT to control malaria, disinfectants, and other applied science.</li><br>
          <li><strong>1942</strong> - Receives a Ph.D. in Genetics and Plant Pathology</li><br>
          <li><strong>1944</strong> - Rejects a 100% salary increase from Dupont, leaves behind his pregnant wife, and flies to Mexico to head a new plant pathology program. Over the next 16 years, his team breeds 6,000 different strains of disease resistent wheat - including different varieties for each major climate on Earth.</li><br>
          <li><strong>1945</strong> - Discovers a way to grown wheat twice each season, doubling wheat yields</li><br>
          <li><strong>1953</strong> - crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertilizer. It goes on to provide 95% of Mexico's wheat.</li><br>
          <li><strong>1962</strong> - Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population</li><br>
          <li><strong>1970</strong> - receives the Nobel Peace Prize</li><br>
          <li><strong>1983</strong> - helps seven African countries dramatically increase their maize and sorghum yields</li><br>
          <li><strong>1984</strong> - becomes a distinguished professor at Texas A&M University</li><br>
          <li><strong>2005</strong> - states "we will have to double the world food supply by 2050." Argues that genetically modified crops are the only way we can meet the demand, as we run out of arable land. Says that GM crops are not inherently dangerous because "we've been genetically modifying plants and animals for a long time. Long before we called it science, people were selecting the best breeds."</li><br>
          <li><strong>2009</strong> - dies at the age of 95.</li>
        </ul>
        </section>
  
    <div>
      <p id="quote">
      <em>"Borlaug's life and achievement are testimony to the far-reaching contribution that one man's towering intellect, persistence and scientific vision can make to human peace and progress."<em><br><br>
      <em>-- Indian Prime Minister Manmohan Singh</em></p>
    </div>
  
    <div id="reference">
      <h3>If you have time, you should read more about this incredible human being on his <a id="tribute-link" target="_black" href="https://en.wikipedia.org/wiki/Norman_Borlaug">Wikipedia entry</a>.</h3>
    </div>
   
  </body>
  </main>
html {
  font-family: sans-serif;
  font-size: 15px;
  text-align: center;
  background-color: rgba(192,192,192,0.35)
}

h1 {
  margin: 50px 0 30px 0;
}

ul {
  text-align: left;
  margin: auto; 
  max-width: 550px;
}

#quote {
  margin: 50px auto; 
  max-width: 550px;
  text-align: left;
}

#tribute-info h3 {
  padding: 40px 0 40px 0;
}

#img-div {
  background-color: white;
  padding: 20px 0 20px 0;
}

@media (max-size: 500px) {
  img {
    height: auto;
    width: auto;
  }
}

Can anyone give me some advice or ideas for improvements?

Have you used the HTML and CSS Analyse functions, to find syntax errors ?

@Simonious, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.

  • Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The first failing message says

My tribute page should have an element with corresponding id="main", which contains all other elements.
expected null to not equal null
AssertionError: expected null to not equal null

See what the test is looking for? (You have a typo which is causing the test to fail)

On a side note;

  • you have elements out of order. Review this for an understanding of the HTML boilerplate tags.
  • Do not use the <br> element to force line breaks or spacing. That’s what CSS is for.
  • do not try and replicate the sample projects. They show one way the project can be done. For the tribute page can you come up with a figure you respect/look up to, a band you like, etc
  • Be sure and keep the test script when forking the pen (<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>)
    • The test script, with all tests passing, should be included when you submit your projects.

Also, in the future if you could post a link to your pen (or live code) it makes it easier to troubleshoot if people don’t have to copy/paste your code.

Hi,

thanks for your help! I have completely created a new content for this project.

Unfortunately I am still stuck at the last error which I could not solve after many attempts.

It says " The element should responsively resize, relative to the width of its parent element, without exceeding its original size. Try using the “max-width” style property : expected ‘none’ to not equal ‘none’"

I have already changed the code to the above mentioned error, but still no luck. Can you please have a look?

Your code has

#image {
  width: 350px;
}

so it hasn’t been changed per the failing message.

On a side note, when you correct that and run the tests you’ll still see you’re passing 9/10 but if you read the entire failing message you’ll see that it’s different. Even though it looks as though nothing’s changed you need to completely read the failing error message in its entirety.

Hi,

thank you for your reply. I have managed to pass all 10/10 now, but unfortunately I still do not grasp the idea behind or why did it pass now…

I am guessing this 2 CSS parts were causing the problem;

#image {
  display: block;
  max-width: 100%;
  margin: auto;
}

@media (max-width: 100%) {
  image {
    width: 350px;
    height: auto;
    margin: auto;
  }
}

I have read the error message once more and I have added the display: block; and max-width: 100%; to the #image class.

I realised that even if I delete the @media part, the code still works without any error. But what I do not understand the idea behind this error is that, it says needs to be responsivly resize.
Why is that I do not need the media query to work? I thought it should be there so that image can be responsive???

Sorry…I am quite frustrated to try to understand this…

The full text said, The img element should responsively resize, relative to the width of its parent element, without exceeding its original size
“relative to the width of its parent element” is the key part here. So the media query would not affect what the test looks for.

Yes, you can make the image responsive with the media query. This lesson was showing you another, easier, way to do so without having to resort to a media query.

Hope that helps.

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