"17. Your #image should have a max-width of 100% " is not passing through

#main

{

text-align: center;

}

#margin

{

display: block;

text-align: center;

}

#image

{

max-width: 100%;

height: auto;

margin: 0 auto;

}

#img-caption

{

text-align: center;

font-style: italic;

font-weight: bold;

font-family: Arial, Times New Roman, Helvetica;

}

#tribute-info

{

font-size: 20px;

text-align: center;

}

#tribute-link

{

font-size: 30px;

text-decoration: none;

color: black;

}
<title>Dr. Norman Borlaug</title>
<link rel="stylesheet" href="tributepage.css">

Dr. Norman Ernest Borlaug

Father Of The Green Revolution

<div  id="img-div">
    <img src="Images/greenrev.jpg" id="image"
         style="display: block;"    
        alt="An image of Dr. Norman Borlaug">
        <div id="img-caption">
            Norman Borlaug examines wheat stocks at the Rockefeller Agricultural Institute in Atizapan, Mexico, 1970.
        He had just won the Nobel Prize for Peace for his efforts to promote peace through improved agriculture.
        </div> <br>
    <hr>
</div>

Date of Birth
March 25, 1914

Date of Death
September 12, 2009

                            <u><h3>Norman Borlaug's Legacy</h3></u>
            Dr. Norman Borlaug was an icon of agricultural development for the poor farmers of the developing countries of the world. 
            Born on a farm in Cresco, Iowa, USA, he left his footprints in agriculture 
            through his personal and professional commitment to fight 
            hunger and poverty, pioneering work in the development of high-yielding, 
            and disease resistant semi-dwarf wheat varieties, and his strong 
            advocacy for the use of genetically modified (GM) crop varieties to alleviate poverty and hunger.

                            <u><h3>Nobel Peace Prize</h3></u>
            In 1970, the Nobel Peace Prize was awarded to Dr. Norman Borlaug,
            with the Nobel Prize Committee concluding that, "more than any
            other single person of this age, he has helped to provide bread for
            a hungry world. 
            We have made this choice in the hope that
            providing bread will also give the world peace... He has helped to
            create a new food situation in the world and who has turned
            pessimism into optimism in the dramatic race between
            population explosion and our production of food."

                        <u><h3>Norman Borlaug’s strong advocacy of biotech/GM crops and their contribution to Global Food

Security and Alleviation of Hunger and Poverty

            On being awarded the Nobel Peace Prize for saving one billion people
            from hunger, Norman Borlaug wisely reminded the world that he had
            "just bought some time" and that continued investment in improved
            crop technology was a "must" for feeding the world of tomorrow.
            "Norm", as he liked to be known to his legion of friends around the
            world, was an ardent advocate of biotech/GM crops, which he viewed as
            one of the necessary technology tools for ensuring future food security.
    </div>

     <a href="https://achievement.org/achiever/norman-e-borlaug/" 
       target="_blank" 
       title="For more information about Dr. Norman Ernest Borlaug" 
       id="tribute-link">More info</a>

share also your html


I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like

and share a link for the step/challenge/project please

1 Like

I have added the html block of code.

I have sent the link.

hi there, please edit your post so the code is formatted correctly. Please read Ilenia’s post to learn how to do that correctly. Also do not forget to include a link to the challenge.

1 Like

I do not know how to edit it. I will just create another.

I have sent the link already.
Check the messages.

please post your html code properly formatted, you don’t need to edit the first post if you don’t know how to do, but add the code somewhere in this topic

1 Like
<!DOCTYPE html>

<html>
<head>

    <title>Dr. Norman Borlaug</title>
    <link rel="stylesheet" href="tributepage.css">

</head>

<body>

<main id="main">
    <h1 id="title">Dr. Norman Ernest Borlaug</h1>
    <h3>Father Of The Green Revolution</h3>

    <div  id="img-div">
        <img src="Images/greenrev.jpg" id="image"
             style="display: block;"    
            alt="An image of Dr. Norman Borlaug">
            <div id="img-caption">
                Norman Borlaug examines wheat stocks at the Rockefeller Agricultural Institute in Atizapan, Mexico, 1970.
            He had just won the Nobel Prize for Peace for his efforts to promote peace through improved agriculture.
            </div> <br>
        <hr>
    </div>

   <div id="tribute-info">
        
Date of Birth
March 25, 1914
<br>

Date of Death
September 12, 2009

                                <u><h3>Norman Borlaug's Legacy</h3></u>
                Dr. Norman Borlaug was an icon of agricultural development for the poor farmers of the developing countries of the world. 
                Born on a farm in Cresco, Iowa, USA, he left his footprints in agriculture 
                through his personal and professional commitment to fight 
                hunger and poverty, pioneering work in the development of high-yielding, 
                and disease resistant semi-dwarf wheat varieties, and his strong 
                advocacy for the use of genetically modified (GM) crop varieties to alleviate poverty and hunger.

                                <u><h3>Nobel Peace Prize</h3></u>
                In 1970, the Nobel Peace Prize was awarded to Dr. Norman Borlaug,
                with the Nobel Prize Committee concluding that, "more than any
                other single person of this age, he has helped to provide bread for
                a hungry world. 
                We have made this choice in the hope that
                providing bread will also give the world peace... He has helped to
                create a new food situation in the world and who has turned
                pessimism into optimism in the dramatic race between
                population explosion and our production of food."

                            <u><h3>Norman Borlaug’s strong advocacy of biotech/GM crops and their contribution to Global Food
Security and Alleviation of Hunger and Poverty </h3></u>
            
                On being awarded the Nobel Peace Prize for saving one billion people
                from hunger, Norman Borlaug wisely reminded the world that he had
                "just bought some time" and that continued investment in improved
                crop technology was a "must" for feeding the world of tomorrow.
                "Norm", as he liked to be known to his legion of friends around the
                world, was an ardent advocate of biotech/GM crops, which he viewed as
                one of the necessary technology tools for ensuring future food security.
        </div>

         <a href="https://achievement.org/achiever/norman-e-borlaug/" 
           target="_blank" 
           title="For more information about Dr. Norman Ernest Borlaug" 
           id="tribute-link">More info</a>

</main>
</body>



</html>

I have posted the code above.

your img is inside a img-div which does not have a width, you may need to give a width to this before the width of the image is recognised, and to main maybe. width: 100% is perfectly fine.

A note on your image, to use it in the freeCodeCamp editor you need to have a link to the image, having a broken link could also be a reason for that to not work.

1 Like

Tried it, did not work.

Have you completed the tribute page project? If so, can you send me a link to your own tribute page?
I will compare and contrast.

Hi there!

You need to post your updated code here to assist you, posting solution code is not allowed here on the forum.

1 Like

Oh, okay.
This is the link to my code:

We can’t see your code unless you copy it here. Please read ilenia’s post to learn how to format the code here.

1 Like

Your CSS file has to be named styles.css, not tributepage.css

2 Likes

This is the solution.
Thank you all for your responses.