Not sure where to place this .one side tells me to place it with the css the other tells me to to put it where the h2 and p are because its a img element

Not sure where to place this .one side tells me to place it with the css the other tells me to to put it where the h2 and p are because its a img element
0

#1

**Tell us what’s happening:**cannot complete task

Your code so far

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .smaller-image{
    width:100px ;
  }
  .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. ">

<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>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge:


#2

You just need to add the smaller-image class to the <img>.


#3
  .smaller-image{
    width: 100px ;
  }
</style>```
like this

#4

There’s that, but you also have to add the smaller-image class to the <img> element (like you did by adding the red-text class to the <h2>).


#5
    width: 100px ;
  }
</style>
<img class="smaller-image"</img>```

#6

this is where im at i know its not right


#7

You’re close. However the proper syntax is

<img class="smaller-image">

not

<img class="smaller-image"</img>

There should be no closing </img> tag.

Then you just have to add in the src and alt attributes.


#8

this is what ive done and oh course it doesnt work.

<style>
  .smaller-image{
    width: 100px ;
  }
</style>
<img src class="smaller-image" alt=" a smaller orange cat"```

#9

You didn’t set a value to the src attribute. And there should be a > at the end.


#10

Is okay to have muple style tags or do keep erverything under the one stle tag

do you keep everything under the style tag or do u use multiple style tags.


#11

I think multiple <style> tags will work, but I don’t see the point of having multiple <style> tags in one page.

Then again, when you’re going to make projects, you’ll most likely use a separate CSS file rather than putting the CSS in <style> tags.


#12

i know the class isnt correct but i be

<style>
  .smaller-image{
    width: 100px;
  }
  .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. ">
<img src class="smaller-image" alt= "larger image">```

#13

You only need one <img> for this challenge. Put the src, class, and alt attributes in that one <img> element.


#14

I posted in the wrong thread - here is some advice to help:


#15

thanks for your help it is greatly appreciated