Resizing my image

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

  **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>
<img class="smaller-image" src="http://www.example.com/picture"/>

<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 src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.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="https://freecatphotoapp.com/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 (Linux; Android 11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Challenge: Size Your Images

Link to the challenge:

Look at the output in the console pane, it is telling you exactly why the tests are failing.

Also, you added an extra <img>. You don’t want to do that. These tests are very picky. Only do exactly what the instructions are asking you.

1 Like

What you have done is correct. But you did it to the wrong image. Add the smaller-image class to the already existing image and remove that extra image you added.

2 Likes

@skamat is right. You’ve got the right css, but applied to the wrong img, @bambamfx213

1 Like

Please help me🙏 I still don’t get it …can you please post a screenshot of how I should write the code …I’m only 2weeks into coding and don’t really know my way around

Please can you guide me on adding the smaller image ,I’ve been stuck for a week and I’m quite pissed🙏

Remove this extra image element you have added here.

and add the class smaller-image to the already existing image in the anchor tag here:

So the image in the anchor tag will now be -

Note the class = smaller-image added to the image in the anchor. To pass the test, the class should be added to this image, not any other.

1 Like

Thanks alot man I’m so happy now🙂 I’ve passed the test…I owe u

1 Like

I agree, this challenge was difficult to understand, the placement of the code and the img class was a step I did not see in the explanation.

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