[SOLVED] Size Your Images Error

[SOLVED] Size Your Images Error
0.0 0

#1

Hello guys. The site finds this error: Your img element should have the class smaller-image.
But I’ve put a class=“smaller-image” to my img element. Do I missing something?

Your code so far


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

  h2 {
    font-family: Lobster, monospace;
  }

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

  .smaller-image{
    width: 100px;
  }

</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="http://images4.fanpop.com/image/photos/16000000/Beautiful-Cat-cats-16096437-1280-800.jpg" 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.13; rv:62.0) Gecko/20100101 Firefox/62.0.

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


#2

It won’t pass if you changed the image’s src attribute. Try reverting it back to https://bit.ly/fcc-relaxing-cat


#3

It worked, but now I get this error: Your image should be 100 pixels wide. Browser zoom should be at 100%.

This is the reason I changed the src attr in the first place! :smile:


#4

Weird, it’s passing on my Firefox (the latest stable) :confused:


#5

Hm, I use a Firefox too. Developer edition, though. maybe it’s a bug. I’ll try it on another browser!


#6

It passed when I logged out! I don’t know maybe it doesn’t likes me! :smile: