Make an Image Responsive

why isn’t this working?

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

freeCodeCamp stickers set


<style>
.img {
    max-width: 100%;
    display: block;
    height: auto;
}
</style>

<img src='//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/freecodecamp/original/3X/d/1/d1e14bf91096b3d4dc11a7726885b946e36f49c0.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/67.0.3396.79 Safari/537.36.

Link to the challenge:

no dot needed if you are referring to an html element… dots are for class names…

1 Like