Help with Tribute Page - User Story #8 responsive image

Really not sure why this is failing. The image is responsively resizing based on the width of the parrent.

Any help would be great.

.responsive-img {
  display: block;
  max-width: fit-content;
}

This is what I tried and it passed.
I think this should solve your problems.

One tip I can give is read the error in the tests that didnt pass clearly. Then you will understand the problem.


Read these carefully.
Remember the fit-content property?

Thank you very much for that. I was following this tutorial(https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-principles/make-an-image-responsive), which does not mention using that display value, so not sure how I would have known that. Yes, and thank you for the reminder to read the error carefully. I will take that on from now on. :slight_smile:

1 Like

i learned from a video on youtube. you have to read the first two messages on code. also if you want to a coder try google searching it with code explantion error