Tribute Page - Build a Tribute Page

Tell us what’s happening:

Hello Everyone… Im trying to center the image but its not working… so far this is were im stuck for now.

Your code so far

Tribute Page

Dr. Norman Borlaug

The man save a Billion Lives

tribute-page-main-image
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.

Here's a time line of Dr. Borlaug's life:

  • 1914

    - Born in Cresco, Iowa

  • 1933

    - 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."

  • 1937

    - Finishes university and takes a job in the US Forestry Service

  • 1938

    - 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.

  • 1941

    - 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.

  • 1942

    - Receives a Ph.D. in Genetics and Plant Pathology

  • 1944

    - 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.

  • 1945

    - Discovers a way to grown wheat twice each season, doubling wheat yields

  • 1953

    - 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.

  • 1962

    - 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

  • 1970

    - receives the Nobel Peace Prize

  • 1983

    - helps seven African countries dramatically increase their maize and sorghum yields

  • 1984

    - becomes a distinguished professor at Texas A&M University

  • 2005

    - 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."

  • 2009

    - dies at the age of 95.

  • "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."

    -- Indian Prime Minister Manmohan Singh

  • If you have time, you should read more about this incredible human being on his Wikipedia entry .

img{

display: block;

}

Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key.

Please do this to your HTML and CSS above.

<!DOCTYPE html>
<html lang="en">

<head>
 <meta charset="UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <link rel="stylesheet" href="style.css">
 <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400&display=swap" rel="stylesheet">
 <title>Tribute Page</title>
</head>

<body>
 <main id="main">
  <header>
   <h1 class="header">Dr. Norman Borlaug</h1>
   <p class="subheader">The man save a Billion Lives</p>
  </header>

  <div id="img-div">
   <img id="image" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute-page-main-image.jpg"
    alt="tribute-page-main-image">
   <div 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.</p>
   </div>
  </div>

   <div id="tribute-info">
    <p id="title">Here's a time line of Dr. Borlaug's life:</p>
    <ul>
     <li><p>1914</p><p>- Born in Cresco, Iowa</p></li>
     <li>
      <p>1933</p>
      <p>- 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."</p>
     </li>
     <li>
      <p>1937</p>
      <p>- Finishes university and takes a job in the US Forestry Service</p>
     </li>
     <li>
      <p>1938</p>
      <p>- 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.</p>
     </li>
     <li>
      <p>1941</p>
      <p>- 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.</p>
     </li>
     <li>
      <p>1942</p>
      <p>- Receives a Ph.D. in Genetics and Plant Pathology</p>
     </li>
     <li>
      <p>1944</p>
      <p>- 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.</p>
     </li>
     <li>
      <p>1945</p>
      <p>- Discovers a way to grown wheat twice each season, doubling wheat yields</p>
     </li>
     <li>
      <p>1953</p>
      <p>- 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.</p>
     </li>
     </li>
     <p>1962</p>
     <p>- 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</p>
     </li>
     <li>
      <p>1970</p>
      <p>- receives the Nobel Peace Prize</p>
     </li>
     <li>
      <p>1983</p>
      <p>- helps seven African countries dramatically increase their maize and sorghum yields</p>
     </li>
     <li>
      <p>1984</p>
      <p>- becomes a distinguished professor at Texas A&M University</p>
     </li>
     <li>
      <p>2005</p>
      <p>- 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."</p>
     </li>
     <li>
      <p>2009</p>
      <p>- dies at the age of 95.</p>
     </li>
     <li>
      <p>"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."</p>
      <p>-- Indian Prime Minister Manmohan Singh</p>
     </li>
     </ol>
     <p>If you have time, you should read more about this incredible human being on his <a id="tribute-link"
       href="https://en.wikipedia.org/wiki/Norman_Borlaug" target="_blank">Wikipedia entry</a> .</p>
   </div>
 </main>
</body>

</html>

<style>
img{

display: block;

</style>

Thank you. Much better :slight_smile:

First, I would not add your CSS using a style element in the HTML. I would add it in the styles.css editor.

Second, count your curly braces in your CSS. Remember, for every opening curly brace { there must be a matching closing curly brace }.

Make sure you style your image so it meets all the testing requirements.

  • Your img element should have a display of block (You did this one)
  • Your #image should have a max-width of 100%. (I don’t see this one)
  • Your #image should have a height of auto. (I don’t see this one)
  • Your #image should be centered within its parent. (I don’t see this one)

like this?

img{
 display: block;
}
#img-div #image{
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  height: auto;
}

Yes, that looks good to me. If you are still not passing these tests then you probably forgot this note at the bottom of the instructions:

Note: Be sure to add <link rel="stylesheet" href="styles.css"> in your HTML to link your stylesheet and apply your CSS.

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