Make an Image Responsive

Make an Image Responsive
0.0 0

#1

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='//discourse-user-assets.s3.amazonaws.com/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:
https://learn.freecodecamp.org/responsive-web-design/responsive-web-design-principles/make-an-image-responsive


#2

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