Tell us what’s happening:
The test runner says i didn’t met this requirments but they are already in my code : * Your img
element should have a display
of block
.
-
Waiting:Your
#image
should have amax-width
of100%
. -
Waiting:Your
#image
should have aheight
ofauto
. -
Waiting:Your
#image
should be centered within its parent.
Your code so far
WARNING
The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.
You will need to take an additional step here so the code you wrote presents in an easy to read format.
Please copy/paste all the editor code showing in the challenge from where you just linked.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/styleid.css" >
<link href="https://getbootstrap.com/docs/4.2/content/reboot/#native-font-stack" rel="stylesheet">
<title>Tribute</title>
</head>
<body>
<main id="main">
<div id="title">
<h1><strong>Dr. Norman Borlaug</strong></h1>
<p>The man who saved a billion lives</p>
</div>
<figure id="img-div">
<img id="image" src="images/tribute-page-main-image.jpg"alt="">
<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>
<h2>Here's a time line of Dr. Borlaug's life:</h2>
<div class="list">
<ul>
<li><strong>1914</strong> - Born in Cresco, Iowa </li>
<li> <strong>1933</strong>- Leaves his family's farm to attend the University of Minnesota, thanks <br>
to a Depression era program known as the "National Youth Administration"
</li>
<li> <strong>1935</strong>- Has to stop school and save up more money. Works in the Civilian <br> Conservation Corps, helping starving Americans. "I saw how food changed <br>them", he said. "All of this left scars on me."
</li>
<li> <strong>1937</strong>- Finishes university and takes a job in the US Forestry Service
</li>
<li> <strong>1938</strong>- Marries wife of 69 years Margret Gibson. Gets laid off due to budget<br> cuts. Inspired by Elvin Charles Stakman, he returns to school study under<br> Stakman, who teaches him about breeding pest-resistent plants.
</li>
<li> <strong>1941</strong>- Tries to enroll in the military after the Pearl Harbor attack, but is <br>rejected. Instead, the military asked his lab to work on waterproof glue, DDT<br> to control malaria, disinfectants, and other applied science.
</li>
<li> <strong>1942</strong>- Receives a Ph.D. in Genetics and Plant Pathology
</li>
<li> <strong>1944</strong> - Rejects a 100% salary increase from Dupont, leaves behind his <br>pregnant wife, and flies to Mexico to head a new plant pathology program.<br> Over the next 16 years, his team breeds 6,000 different strains of disease <br>resistent wheat - including different varieties for each major climate on Earth.
</li>
<li> <strong>1945</strong>- Discovers a way to grown wheat twice each season, doubling wheat<br> yields
</li>
<li> <strong>1953</strong> - crosses a short, sturdy dwarf breed of wheat with a high-yeidling <br> American breed, creating a strain that responds well to fertilizer. It goes on to<br> provide 95% of Mexico's wheat.
</li>
<li> <strong>1962</strong> - Visits Delhi and brings his high-yielding strains of wheat to the Indian <br>subcontinent in time to help mitigate mass starvation due to a rapidly<br> expanding population
</li>
<li> <strong>1970</strong> - receives the Nobel Peace Prize
</li>
<li> <strong>1983</strong> - helps seven African countries dramatically increase their maize and<br> sorghum yields
</li>
<li> <strong>1984</strong> - becomes a distinguished professor at Texas A&M University
</li>
<li> <strong>2005</strong> - states "we will have to double the world food supply by 2050." Argues<br> that genetically modified crops are the only way we can meet the demand, as<br> we run out of arable land. Says that GM crops are not inherently dangerous<br> because "we've been genetically modifying plants and animals for a long<br> time. Long before we called it science, people were selecting the best breeds."
</li>
<li> <strong>2009</strong>- dies at the age of 95.
</li>
</ul>
</div>
<div id="tribute-info">
<p><em>"Borlaug's life and achievement are testimony to the far-reaching contribution<br> that one man's towering intellect, persistence and scientific vision can make to<br> human peace and progress."</em></p>
<p id="ind">-- Indian Prime Minister Manmohan Singh</p>
</div>
<h2 id="last">
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>.
</h2>
</main>
</body>
</html>
CSS:
:root{
--mainBgColor :#EEEEEE;
--mainFntColor: #333333;
}
html{
font-size: 10px;
}
body{
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
color: var(--mainFntColor);
font-size: 1.6rem;
text-align: center;
line-height: 1.5;
margin: 0;
padding: 0;
box-sizing: border-box;
}
#main{
background-color: var(--mainBgColor);
margin: 30px 8px;
border-radius: 5px;
padding: 15px;
}
/*
title{
margin-bottom: 15px;
/* margin-top: 5px;
padding-top: 30px;
}*/
h1{
font-size: 4rem;
margin: 27px 0 0;
display: block;
}
#img-div{
background-color: #fff;
margin: 0;
padding: 10px
}
img{
display: block;
max-width:100%;
height: auto;
margin: 0 auto;
}
#img-caption{
margin: 15px 0 5px 0;
}
h2{
margin: 50px auto;
font-size: 2rem;
}
.list{
margin: 0 auto 50px auto;
max-width: 550px;
line-height: 1.6;
text-align: left;
}
li{
margin: 16px 0;
font-weight: 200;
}
#tribute-info{
margin: 30px auto 50px;
font-style: italic;
text-align: left;
max-width: 545px;
}
#tribute-link{
color:rgb(116,99,143);
font-size: 1.6rem;
letter-spacing: normal;
}
#last{
margin: 28px auto 20px;
font-size: 2rem;
}
@media (max-width: 668px) {
#main {
margin: 5px;
}
#img-div {
padding: 1% 1.25% 2%;
}
h2{
font-size: 1.8rem;
}
h1{
font-size: 3.5rem;
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Challenge: Tribute Page - Build a Tribute Page
Link to the challenge: