Max-width problem with the Tribute Page

Hi! I have a little problem with the project of the Tribute Page.

In specific, with this condition:
The img element should responsively resize, relative to the width of its parent element, without exceeding its original size.

Well, I don’t know why but it shows me an error, I tried to put an max-width to the parent in the CSS but anything, hope you can help me :wink:

Thanks!

Here’s my CSS code:

       #img-div {
            margin-top: 8em;
            align-self: center;
            max-width: 400px;
        }

        #img-div img {
            width: 100%;
            height: auto;
        }

Hi @erdanncode !

Welcome to the forum!

The test is looking for the img element with the max-width property not the img div.

1 Like