I can’t get this code to work:
How do I size my Image?
The question is telling me to do this…
“Create a class called
smaller-image and use it to resize the image so that it’s only 100 pixels wide. Your
img element should have the class
Your image should be 100 pixels wide.”
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
font-family: Lobster, monospace;
<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>
<p>Things cats love:</p>
<p>Top 3 things cats hate:</p>
Before we can answer your question:
Go ahead, and Copy and paste the entire code from the Tutorial that you are working through Here, and pre format it.
To share code, you can use the Preformatted text button.
This allows you to share raw code :
Just select the code that you want to keep raw, and press the button.
The image on the right is raw code .
Then leave a link to the Tutorial that you are on.
I don’t see where you have tried to do this. Can you share code where you have tried to do this?
Is there a portion of the instruction on the first part of this that we can help explain better for you?
E só chamar sua “class” !
width: Por o seu valor ;
height: Por o seu valor;
também da pra usar o ‘picture src’
Espero ter ajudado com o exemplo!
IN THIS TUTORIAL:
We are being asked to
Create a class called
smaller-image and use it to resize the image so that it’s only 100 pixels wide.
FIRST: To add the class to the image:
<img src=“https://cdn.freecodecamp.org/non-curriculum/non-cat-photo-app/non-relaxing-cat.jpg” [ WE ADD THE CLASS HERE ] alt=“Some cat lying on its back.”>
class="smaller-image" looks like:
<img src=“https://cdn.freecodecamp.org/non-curriculum/non-cat-photo-app/non-relaxing-cat.jpg”class=“smaller-image” alt=“Some cat lying on its back.”>
SECOND: We add the class to the CSS:
<style> </style> tags:
PLACE THE CSS WITHIN THE STYLE TAGS:
Thank you so much! I got so lost on this problem! But I finally was able to fix it thanks to your help and everyone in this forum. I am forever grateful. I am a newbie programmer and trying to learn as much as I can. Studying to become a software engineer!
This Tutorial is not Explicit about everything that needs to be done to pass, a lot of people have some difficulties with the Instructions.
Exactly! Yeah it gets confusing at times. But now I’m doing just fine and progressing through it! ^FT^