In the HTML5 and CSS catagory in the “size your images” topic, what is wrong with this current code? Could you correct it for me please.
<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>
<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. " />
<style>
.smaller-image {
width: 100px;
}
</style>
<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details .
Absolutely not. We have projects to work on too, do you think we just correct people instead of helping them to do it and learn?
I’ll be nice and give you a hint: You defined the class in <style>
but you never applied it to your image. You need to add classes to your html elements with the class=""
attribute inbetween the <>
of the <img>
tag. Rember, when defining classes you do it with a dot in front. When adding a class to an element, you do not need a dot, i.e. class="classname"
not class=".classname"
Hope this helps you solve the problem!
2 Likes
your should apply your .smaller-image class
<img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. " />
1 Like
well thank you adding this /> at the end made minds correct
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
}
.smaller-image {
width: 100px;
}
CatPhotoApp
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
EzEeee
June 24, 2019, 7:10pm
7
FYI: The only way I was able to pass this was to zoom my browser down to 90%. Wouldn’t pass with (Chrome) browser at 100%. Cray cray