Sizing images using css- keeps on saying it keeps on saying “your image should be 100 pixels wide” and IT IS. i dont get it

Sizing images using css- keeps on saying it keeps on saying “your image should be 100 pixels wide” and IT IS. i dont get it
0

Tell us what’s happening:

Your code so far


<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .smaller-image {
    width: 100 px;
  }
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, monospace;
  }

  p {
    font-size: 16px;
    font-family: monospace;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>
<main>
  <p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
  
  <a href="#"><img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
  
  <div>
    <p>Things cats love:</p>
    <ul>
      <li>cat nip</li>
      <li>laser pointers</li>
      <li>lasagna</li>
    </ul>
    <p>Top 3 things cats hate:</p>
    <ol>
      <li>flea treatment</li>
      <li>thunder</li>
      <li>other cats</li>
    </ol>
  </div>
  
  <form action="/submit-cat-photo">
    <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>
  </form>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/size-your-images

Check carefully how the width is set in this example.

div.b {
  width: 150px;
  border: 1px solid black;
}

just tried that, it still wont work.

What did you just try?

the format of the width example you just provided

Could you post the code example of what you tried?

<style>```
  .smaller-image {
  width: 100px;
  }

im not sure if there is a solution.

That’s weird. I copied and pasted your code in with the correction you made, and it passed.
Try a hard refresh of your browser.

Hint: check your whitespace

And, by the way, welcome to Free Code Camp. Land of hopes and dreams, and the desperation of student programmers. :wink:

hi! what do u mean by white space?

There isn’t supposed to be spaces between a number value and its unit.

FYI for all: The original poster eliminated the white space between the number value and its unit, shown in the fifth or sixth comment from the top.