Can't make my img responsive

I can’t pass the test and make the " <img> element should responsively resize, relative to the width of its parent element, without exceeding its original size."

I am using

 img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; 
}

But it doesn’t work

Here is my code: https://codepen.io/augustin16/pen/jOBrrWe

I would highly appreciate the help!

Hi @augustin16 !

You need to get rid of the style tags in your css.
Then it will work.

Style tags are html tags and don’t belong in your css.

Now that you are building projects, you don’t need style tags.
You should keep your html and css separate.

Hope that helps!

1 Like

Thanks for the quick reply, it does!!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.