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: