Tell us what’s happening:
HI there - so I am trying to complete one of freecodecamp’s certification courses and am having some trouble with one of the sections. For one of the lessons, I need to make an image responsive using max-width and height features, but I keep receiving an error alert from the test output saying that I need to correct my code. If you can see below in my responsive-img class, I have stated what how I want my image to behave and it falls within the instructions from the lesson. With that said, the test output is still saying that I have not set my responsive-img class to have a max-width of 100%.
This is very confusing and I have not been able to find a resource that has provided a correct solution! Hopefully somebody can help!
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 class="responsive-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/18.17763
.
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