Make an Image Responsive (Your responsive-img class should have a max-width set to 100%.)

I believe I have made the proper changes in the code.

Getting an X for: Your responsive-img class should have a max-width set to 100% .
Success for: Your responsive-img class should have a height set to auto .

Any advise would be appreciated.

Your code so far


<style>
.responsive-img {
max-width: 100%;
height: auto;

}

img {
max-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/70.0.3538.102 Safari/537.36 Edge/18.18363.

Challenge: Make an Image Responsive

Link to the challenge:

You are probably only supposed to have one img element.

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

freeCodeCamp stickers set

I was using Edge … just switched to Chrome and it works …

1 Like