Tribute Project - maxwidth: in px

Tribute Project - maxwidth: in px
0

As it stands, this does not work:


The picture is a fixed size, even though all project tests are passed.

If I change the max-width: from a constant to a percentage (e.g. 80%), then the picture will resize appropriately.

What do I not understand here?

1 Like

when you use fixed size for image it will pass test on large screen but not on small screens because margin auto set image to the center on large screen but when you use it on small screen is not at the center of its parent element.so use max-width:100%; instead of max-width:700px;
to pass all test on all devices.

1 Like

Thank you. I believe you are pointing me in the right direction to answer my question. I was only testing on a large screen, with the browser window narrowed to less than 700 px, but the answer is probably still applicable. I just need to study it to fully appreciate the answer.

1 Like

Thank you for sharing your question, I am currently having an issue re-sizing!