Code not being accepted

Tell us what’s happening:
In the module “Responsive Web Design Principles: Make an Image Responsive”, it continues to tell me “Your responsive-img class should have a max-width set to 100% .”

It is. I’ve reset the code multiple times, refreshed the browser, tried various placements, spacings, double-triple checked spelling and syntax, but it continues to fail… Is this broken, or am I just missing something?

Your code so far


<style>
.responsive-img {
max-width: 100%;
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/64.0.3282.140 Safari/537.36 Edge/17.17134.

Challenge: Make an Image Responsive

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-principles/make-an-image-responsive

I tested your code in Chrome (PC) and it passes. What browser are you using?

Hello, webbgdor.

Somethings to try:

  1. Disable all browser extensions from having acess to freeCodeCamp.
  2. Make sure your zoom level is at 100%.
  3. I can see you are using a potentially outdated browser version. Update it to the latest stable build.

Hope this helps

1 Like

Edge. This is the first issue I’ve run into, so browser compatibility didn’t occur to me. I’ll try that, thanks!

I can confirm this challenge is not working in Edge.

Your code is correct. Keep going :slight_smile:

Switching to Chrome helped me get past this issue, but then I get stuck with a similar issue on the very next challenge:

https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-principles/use-a-retina-image-for-higher-resolution-displays

It tells me that the width needs to be set to 100px and height needs to be set to 100px. Here is my code:

<style>
    img {
        height: 100px;
        width: 100px;
    }
</style>

<img src="https://s3.amazonaws.com/freecodecamp/FCCStickers-CamperBot200x200.jpg" alt="freeCodeCamp sticker that says 'Because CamperBot Cares'">