Size your image issue

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

<img class="smaller-image" width:100px;>CatPhotoApp> 
<link href="" rel="stylesheet" type="text/css">
.red-text {
  color: red;

h2 {
  font-family: Lobster, monospace;

p {
  font-size: 16px;
  font-family: monospace;

<h2 class="red-text">CatPhotoApp</h2>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="" alt="A cute orange cat lying on its back."></a>

  <p>Things cats love:</p>
    <li>cat nip</li>
    <li>laser pointers</li>
  <p>Top 3 things cats hate:</p>
    <li>flea treatment</li>
    <li>other cats</li>

<form action="">
  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label><br>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>

Challenge: Size Your Images

Link to the challenge:

My challenge is this: the assignment is to create a class called smaller-images and use it to resize the image so that it is only 100 pixels wide.
From the example given, I gave my solution as:

       . smaller-image{width:100px;}

But the computer says it is incorrect. Where did I go wrong, please?

Hi @ginikaadiele1 !

I see a few things here

You should delete this because it has errors in it

You need to add the class of smaller-image here

You need to remove the space after the period here

I took your corrections. Thank you. This is what I understood from it:

<a href="#"><img src="" alt="A cute orange cat lying on its back". class="smaller-image" image="width:100px;></a>

It still says that ‘the width has to be 100’. What else am I doing wrong, please?

For the img tag, you are only supposed to add the class.
I would reset the lesson and just add the class of smaller-image.

Then in your style tags that is where you are supposed to add the width of 100px

Just like you did here except without that extra space

Thank you so much. It worked.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.