'm having trouble with the Tribute page Cert . I’ve been trying to figure it out for 2 days but feel I am just adding unnecessary code. I cleaned it up to what I think it should be but still no passing, these 3 issues:
Your img element should have a display of block.
Failed:Your #image should have a max-width of 100%.
Failed:Your #image should be centered within its parent.
Here’s the image part of the HTML code:
type or paste code <link rel="stylesheet" href_="styles.css"/>
<title id="title" type="text">Malala Yousafzai</title>
<h1>Tribute To Malala Yousafzai Nobel Peace Prize Recepient</h1> </head>
<img src="https://commons.wikimedia.org/wiki/File:Shinz%C5%8D_Abe_and_Malala_Yousafzai_(1)_Cropped.jpg" alt="Malala" id="image" display="block"/><br>
<figcaption id="img-caption">Fig.1 - Malala Yousafzai, (2019) Youth and Women's Activist, Nobel Peace Prize (2014)
After the URL there is an id=“image”. It still does not work. I copied everything to codepen and asked it to validate the code. It did not find any errors. I thought it was because I was not centering it correctly. I appreciate your help to track this down.
Thank you for your help but I still get the same 3 errors. I looked on several forums and there are a lot of different people trying to write the code for this with different thoughts about max-width. I changed it back to 100% as you suggested and removed the #img-div as you suggested. It still does not pass. I have gone through all steps again, and it appears that it is step 8 of the 9 steps that I am having this issue on. I will go back to 3Wschools again to research responsive images centered within a parent. I guess this is real web development. I appreciate all your suggestions and help! Have a cup of coffee while I go check this out.