I think this may be broken, or I am missing something

I think this may be broken, or I am missing something
0.0 0

#1

I sort of feel like something is broken here, as I’ve tried to directly copy and paste the help in but it didn’t work, anyone have any ideas?


<style>
  h2  
  {
    color: red;
  }
    
</style>

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

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

Link to the challenge:


#2

Hi JamesT,

Your code achieves the required result, but does not do it in a way required by freeCodeCamp. See these 2 paragraphs:

Inside your style element, change the h2 selector to .red-text and update the color’s value from blue to red.

Give your h2 element the class attribute with a value of ‘red-text’.


#3

Thank you for replying, I have now updated it, but it still insissts that my stylesheet should declare a red-text class. How does one set up a red text class if you cant do nests in css?


#4

Strike my earlier answer. Can you paste your current code?


#5
<style>
  h2  
  {
    color: red;
  }
    
</style>

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

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

#6

You need to define the .red-text class in the “style” section like so:

.red-text {
    color: red;
  }

#7

Thank you for your help :slight_smile: