Build a Tribute Page h

Tell us what’s happening:
I am stuck at following in tribute page challange. I am not sure what exactly needs to be done here. So far, I applied, max-width:auto and display:flex in my img class. but nothing is helping.

User Story #8: The img element should responsively resize, relative to the width of its parent element, without exceeding its original size.

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

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/responsive-web-design-projects/build-a-tribute-page

To make images responsive, I use:

display: block;
max-width: 100%;
height: auto;

I hope that helps!

EDIT: An explanation: By default, images display as inline. The reason I wouldn’t set the display as flex is because you should only apply display: flex; to containers.

1 Like

It worked! Thank you! :slight_smile:

1 Like