I am stuck on this one… trying to reduce image size and have tried all other examples shown on previous comments. Still doesn’t work.!
still getting the below message,
Your img element should have the classsmaller-image. Your image should be 100 pixels wide.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
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.
Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.
Hi, thank you for the reply. I have added the class as suggested 1st manually to understand the concept then I copied and pasted.
Still shows the error.
p {
font-size: 16px;
font-family: monospace;
}
<a href="#"><img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
.smaller-image {
width: 100px
}
</style>
@Ric1, looking at your original question you were tasked with two things;
creating a class called smaller-image and
use it to resize the image so it it only 100px wide
Your original code does not have this.
Please post your updated code. The post by jwilkins.oboe shows how to properly format code to add it to this post.
Edit: In your subsequents posts it looks as though you correctly added the smaller-image class inside the style tags. Did you also remember to add this class to the img element?