Problem with image CSS in Tribute project

I am using the fork me site to test the code for the Tribute Page project and I keep getting one error that my image is not centered in its parent element. I have not been able to troubleshoot this without more errors. Thanks. https://codepen.io/cliftonkerry/pen/GaRKKQ

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36.

Challenge: Build a Tribute Page

Link to the challenge:

Hi there. Your page looks great but unfortunately I believe that the image has to be horizontally centered on your page to pass the tests. Try taking your item3 CSS grid display off (and the other grid related CSS) as well as those from the image div. You may also need to make sure that all padding and margins are gone from the image.
If you would like, you can make these changes just to pass the test and once submitted you can copy your code onto your own pen and replace it with your original code to save on codepen as a sample of your work. Hope this helps.

Thanks! Sounds like a good idea.

The image doesn’t have to be centered on the page, just within its parent element. You only have to remove the padding-right on your image-div (replace it by a margin-right).

Thanks! That’s it. I’ll save another copy for myself with the padding adjusted.

On a side note, the test script should be included, with all tests passing, when you submit your projects.

Thanks, I added that script.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.