Override Styles in Subsequent CSS help

Tell us what’s happening:

Your code so far


<style>
  body {
    background-color: black;
    font-family: monospace;
    color: green;
  }
  .pink-text {
    color: pink;
    .blue-text {
    color: blue;
    }
  }
</style>
<h1 class="pink-text blue-text">Hello World!</h1>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/override-styles-in-subsequent-css

stuck on this code it wont let me continue but cant see what is wrong ?

You put the .blue-text declaration inside the .pink-text, so CSS doesn’t recognize it as a new declaration. Put it after the closed pink-text declaration and you should be fine. Hope this helps! :slight_smile:

2 Likes

Thank you very much It worked

1 Like