Responsive Image using max-width

Tell us what’s happening:
I am trying to go through the make an image responsive but when I code "max-width: 100%; " it doesn’t pass the test. Can anyone tell me why?

Here is the objective:
Your responsive-img class should have a max-width set to 100% .

Your code so far


<style>
.responsive-img {
max-width: 100%;
display: block;
height: auto;
}
img {
width: 600px;
}
</style>

<img class="responsive-img" src="https://s3.amazonaws.com/freecodecamp/FCCStickerPack.jpg" alt="freeCodeCamp stickers set">
<img src="https://s3.amazonaws.com/freecodecamp/FCCStickerPack.jpg" alt="freeCodeCamp stickers set">

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299.

Challenge: Make an Image Responsive

Link to the challenge:

Hello!

I clicked “Run Tests” with your code and it passes.

Yeah, your answer looks identical to the one provided in “Hint”. It ought to pass. I went through a similar problem and it just turned out my laptop was too old to handle freecodecamp at all. My dad got me a new one now. :wink:

Dark Mode browser extensions and zoom levels outside 100% are also known to mess things up.

thanks, I will look to see why it isn’t passing on my browser.

I see you’re using Edge. Try updating to the latest Chromium version. Or try with the Chrome browser.

Chrome worked! Thanks