Tell us what’s happening:
I’ve passed test after test. This test appears simple and yet the test is not passing. This is the feedback I keep getting: " // running tests Your responsive-img
class should have a max-width
set to 100%
. // tests completed" I have a max-width set to 100% as seen in my code below. Please help.
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/70.0.3538.102 Safari/537.36 Edge/18.18363
.
Challenge: Make an Image Responsive
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
Is your browser zoomed in?
It’s passing fine on my browser.
Roma
April 15, 2020, 9:19pm
#5
If using Edge try updating it to the latest Chromium version. Or try using the Chrome browser.
That’s what I’m doing. I’m using Edge. I was able to pass test on my phone Edge browser.
Sinbad
April 28, 2020, 1:55pm
#7
Hey @tuckeraaron did you find a solution to this? I to have 100% zoom on either Edge or Chrome and it will not accept correct answer.
If your code is the same as above, try clearing the cache and refreshing the page. If that doesn’t work, try a different browser.
1 Like
Sinbad
April 28, 2020, 2:21pm
#9
Thank you @JeremyLT . I have now found the error of my ways…
I added a second img tag within the .responsive-img {} tag. Like so:
.responsive-img {
**img {**
max-width: 100%;
height: auto;
**}**
}
I removed the highlight bold lines and it worked a treat.