Hi,
i created the tribute page for the freecodecamp responsive web design course.
Everything is done but the tests for the Layout do not pass and i don’t understand why.
I looked for help on the forum and found a way to center the image. I set the max width on the image but if i understand the error message correctly the max-width is set to ‘null’
Here is the important part:
<div id="img-div" class=image-container>
<img id="image"><a href="https://commons.wikimedia.org /wiki/File:N.Tesla.JPG#/media/File:N.Tesla.JPG"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/N.Tesla.JPG/1200px-N.Tesla.JPG" alt="Photograph of Nikola Tesla, a slender, moustachioed man with a thin face and pointed chin." class=picture></a><br></a></img>
<div>
<p id="img-caption" class=caption >
This is Nikola Tesla posing for a photo
</p>
</div>
</div>
.picture{
max-width: 100%;
height: auto;
}
.image-container{
width: 1500px;
margin: auto;
text-align: center;
}
Here is the link to my codepen:
Challenge: Build a Tribute Page