Image responsiveness test failing

Hi everyone. How do you pass the image responsiveness test? This is the link to my code pen: https://codepen.io/kirubiel/pen/qKwOvV

ā€œAssertionError: Try using the ā€œmax-widthā€ style property : expected ā€˜noneā€™ to not equal ā€˜noneā€™ā€

The unit test expects you to use max-width css property on your image tag.

I did tho :confused:

Ohh is it on the tag? Hold on

No doesnā€™t work :neutral_face:

Hi,
On your img tag add a class called img-responsive.

You can read more about it here: https://www.w3schools.com/bootstrap/bootstrap_ref_css_images.asp

It should help.

1 Like

As I see your image is responsive nowā€¦ and always use percentage for images in pure css if you want responsive images

Thank you so much @KoniKodes. My tribute page passes all tests now. But I canā€™t understand why my code doesnā€™t. I usually avoid frameworks so I can widen my understanding of the language.

Itā€™s been responsive from the beginning. I donā€™t often use fixed values for much of anything. Except text.

Iā€™m glad itā€™s working for you now.

Bootstrap is actually a great tool once you have CSS understood. It brings together the most frequently used rules so that we can focus on everything else.

Happy Coding.

Yeah Iā€™ll probably need it when I do full-stack work. Thanks for the help again.

Happy coding.

1 Like