Basic CSS: SizeYourImages

Hello, Below is my code for the “Size Your Images” challenge, yet I keep getting the run test fail for the image not being 100 pixels wide. Can someone please show me what I’m doing wrong? Thanks!

<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="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

Hey @andresicedo, welcome to the forum!

you are creating the CSS class, but are you applying the class in the HTML?
the cat looks pretty big! :smile:

It edited the code. You can use the “preformatted text” tool in the editor ( </> ) to add backticks around code to get the proper formating.

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.


Your code is passing for me.

If you are using Safari there is a known bug with the challenge right now (we have a fix) so you have to use a different browser.

Thank you for your help!

hey i have the same problem pls help am using google

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.