When I run the test, I keep failing and it’s saying but it’s in my CSS file so I’m not sure what I am doing wrong?
Your img
element should have a display
of block
.
Your #image
should have a max-width
of 100%
.
Your #image
should be centered within its parent.
**Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html>
<meta
<link rel="stylesheet" href="styles.css">
<main id="main">
<title id="title">Dr. Norman Borlaug</title>
<div id="img-div">
<img id="image" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute-page-main-image.jpg" ></img>
<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.</div>
</div>
<h1 id="tribute-info">Here's a time line of Dr. Borlaug's life</p>
<h2>Click on this <a href="https://tribute-page.freecodecamp.rocks/" target="_blank" id="tribute-link">link</a></h2>
</main>
</html>
/* file: styles.css */
#image {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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: