Stuck: "Use CSS Selectors to Style Elements"

Tell us what’s happening:
Hi, I’m getting: " Your h2 element should be blue."
To my very limited knowledge what I’ve done is correct, and it is blue. Yet I cannot continue. Please help me. :pensive:

Your code so far


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

<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

<div>
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
</div>

<form action="https://freecatphotoapp.com/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label><br>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36.

Challenge: Use CSS Selectors to Style Elements

Link to the challenge:

Hi there. Your code looks correct and when I run it through it passes. Try refreshing your tab or refreshing your browser. Hope this helps.

1 Like

Are you using a dark-mode extension? Those extensions work by changing your CSS, which interferes with the test suite.

Thank you so much, after a browser restart it worked.

:smiley: Was going crazy.

Yes, I am. Should I disable?

With the CSS challenges it is important to disable all browser extensions that modify your CSS, such as dark mode extensions. freeCodeCamp does have a native dark mode you can enable in your settings.

1 Like

I will do that. Thank you.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.