Size your images- Im stuck on the sizing

Size your images- Im stuck on the sizing
0

#1

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>

#2

I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.


#3

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? :wink:

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!


#4

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. " />

#5

well thank you adding this /> at the end made minds correct


#6
.red-text { color: red; }

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.smaller-image {
width: 100px;
}

CatPhotoApp

A cute orange cat lying on its back.

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.