Tribute Page - Build a Tribute Page

Hello guys, I have problem. I passed almost every tests but problem is with three of them. “Your img element should have a display of block.” , “Your #image should have a max-width of 100%.” and “Your image should be centered within its parent.” Can you check my code? Thank you.


       <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale:1.0">
    <link rel="stylesheet" href="project2styles.css">
    </head>
    <body>
      <div class="whole-page">
      <h1 id="title">Dr. Norman Borlaug</h1>
      <p>The man who saved a bilion lives</p>
      <main id="main">
        <div id="img-div">
          <img id="image" src="https://acsess.onlinelibrary.wiley.com/cms/asset/b9220e74-6d2b-429b-bcec-42c07300e385/csancsa20145931-fig-0003-m.jpg" alt="photo of Norman Borlaug">
          <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>        
        </div>
        <div id="tribute-info">
          <p class="title-of-list">Here's a time line of Dr. Borlaug's life:</p>
          <ul class="info-list">
            <li><b>1914</b> - born in Cresco, Iowa</li>
            <br>
            <li><b>1933</b> - 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><b>1935</b> -  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><b>1937</b> - Finishes university and takes a job in the US Forestry Service</li>
            <br>
            <li><b>1938</b> - 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><b>1941</b> - ries 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><b>1942</b> - Receives a Ph.D. in Genetics and Plant Pathology</li>
            <br>
            <li><b>1944</b> - 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><b>1945</b> - Discovers a way to grown wheat twice each season, doubling wheat yields</li>
            <br>
            <li><b>1953</b> - 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><b>1962</b> - 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><b>1970</b> - receives the Nobel Peace Prize</li>
            <br>
            <li><b>1983</b> - helps seven African countries dramatically increase their maize and sorghum yields</li>
            <br>
            <li><b>1984</b> - becomes a distinguished professor at Texas A&M University</li>
            <br>
            <li><b>2005</b> -  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><b>2009</b> - dies at the age of 95.</li>
          </ul>
          <br>
          <br>
          <p class="indian-premiere-speech">"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."<br><br>-- Indian Prime Minister Manmohan Singh</p>
        </div>
        <h2>If you have time, you should read more about this incredible human being on his <a id="tribute-link" href="http//www.wikipedia.com/Norman-Borlaug" target="_blank">Wikipedia entry.</a></h2>
        </div>
          
        </main>
      </body>
  </html>


* {
    font-family: arial;
}

.whole-page {
    border: 10px solid rgb(235, 235, 235);
    margin: 30px 0px;
    background-color: rgb(235,235,235);
    border-radius: 5px;
}


img {
    display: block;
}


#image {
    max-width: 100%;
    height: auto;
    background-color: white;
    
}


#img-caption {
    text-align: center;
    font-size: 15px;
    
}

h1 {
    text-align: center;
    font-size: 39px;
    letter-spacing: -0.03em;
    margin-top: 40px;
}

p {
    text-align: center;
}

#img-div {
    background-color: white;
    text-align:center;
    margin-left:5px;
    margin-right: 5px;
}

.title-of-list {
    margin-left: auto;
    margin-right: auto;
    padding-top: 40px;
    padding-bottom: 40px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    max-width: 400px;
    
}  

.indian-premiere-speech {
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    max-width: 525px;
    line-height: 1.6em;
    font-style: italic;

}

#tribute-link {
    padding-top: 40px;
    padding-bottom: 20px;
    text-align: center;
    font-size: 17px;
}

.info-list {    
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    max-width: 530px;
    font-size: 16px;
    line-height: 1.5em;
    
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

you will need to link to the fcc stylesheet file which I believe is called styles.css to begin to address these issues.

It worked! Thank you so much! :slight_smile:

1 Like

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