Tell us what’s happening:
This is what it is asking me to do:
Your responsive-img
class should have a max-width
set to 100%
.
Your responsive-img
class should have a height
set to auto
.
It states that I have passed the, “height set to auto”, but it says that I failed the, “max-width to 100%.” I have the max-width set to 100% inside of style, so I’m not sure as to why it is failing. Any help would be greatly appreciated.
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/70.0.3538.102 Safari/537.36 Edge/18.18362
.
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