Changing the Font Size of an Element

Changing the Font Size of an Element
0.0 0

#1

Hello,

I am not able to get past this section. Can anyone assist? Here is my code:

<style>
  .red-text {
    color: red;
    p {
      font-size:16px;
    }   
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

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

Your p class is inside your red text class.


#3

Change this:

color: red;
p {
font-size:16px;
}
}

To this:

.red-text {
color: red;
}
p {
font-size:16px;
}

As @owel noted, your css for p element is inside red-text class.


#4

Thank you. I didn’t realize that 2 different commands had to be separate.


#5

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


#6
.red-text , p { font-size:16px; color:red; }