Help getting through User Story #8

Tell us what’s happening:
Hello guys, I have spent my first few days learning about coding so far and reached the first project completion. I am having trouble passing the requirement of the first project “The img element should responsively resize, relative to the width of its parent element, without exceeding its original size.”. Please take a look at it and give me some hints!

I also watched a few tutorials and saw other people’s projects. Throughout the first few courses on FCC, I am used to styling the page with . Why do others use CSS instead of HTML? is CSS the of HTML? I apologize for this dumb question.

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/79.0.3945.130 Safari/537.36.

Challenge: Build a Tribute Page

Link to the challenge:

Note:

I have never had any experience with computer science or coding in the past. I would also like feedbacks for anyone that have looked over my first scratch of work. I am looking forward to learning more! Thanks guys!

Check out the Make an Image Responsive challenge for some help with the CSS you need on the image. You will also need to center it which you can do use using margin: auto;

Thank you for the reply! I will take a close look at it.

I passed it!
by setting the
display: block
margin-left: auto
margin-right: auto
it helped me fulfilled the requirement to pass the assessment.

but can someone explain to me what happened in this command that triggered this to pass?

The test is looking for some specific properties and values and it does a calculation on the image to see if it is centered (approximately) inside the parent element.

Congrats on passing, happy coding.