Stuck at CSS- Image 100 px not working

Hello there, So I am stuck at CSS at create a class called smaller-image and use it to resize the image so that it’s only 100 pixels wide.
I did and it gives me error.
.smaller-image { width: 100px; }
and the code at html
<a href="#"><img class = "smaller-image" src="" alt="A cute orange cat lying on its back."></a>

It gives me error saying it should have 100px. I tried typing 100 px, 100px etc

Try to post the link of the challenge or there is a tab under Run the test which is Watch a video . Just click on watch a video. That is an awesome explanation

See the src attribute? There are no spaces after it, but there are after class. That is the error. When inside the opening tag, attributes are separated by a space so you cannot add extra spaces like you did for class.

I don’t have space after src

<img class='smaller-image.'

then just change width and height from css


there was someone else saying there is a bug in the 100px; something like that.

1 Like

No bug
you have to add a class smaller-img and set it width 100px then add this class to img tag

I reset and write again and it worked, thanks you!