Can someone assist me with this, please "Your img element should have the class smaller-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;
}
</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 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="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>
<style>
.smaller-image {
  width: 100px;
  }
  </style> 
  <img class="smaller-image" src="http://www.example.com/picture/">
}
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36.

Challenge: Size Your Images

Link to the challenge:

@Luna963
Your img tag should have class attr like this:

<img src="image link" alt="description" class = "class name">

Hope This help

@AndrewAung11, I tried it but still not working.

@Luna963 Have you added the class attr and assign it to smaller-image in img?
And try removing spaces between =.
And in your style tag add a selector and add property width and set it value to 100px.

There is a curly bracket at the end of your image element remove that your code will work

@Luna963 There should be only one style tag and it should be always on the top.

@vilgax04 , it still not working

@AndrewAung11, I did all of that several times but still not working.

The challange is Create a class called smaller-image and use it to resize the image so that it’s only 100 pixels wide.

Reset all code

There is an img Element in your code add a class smaller-image in that as the challange says.

<a href="#"><img 
class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

like this

than in existing style tags add this class

.smaller-image {
  width: 100px;
  }

Done…

@vilgax04, it is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
If you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

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