Override All Other Styles by using Important2

Override All Other Styles by using Important2
0.0 0

#1

Tell us what’s happening:

I can’t get it to like my code on the !important part.

Your code so far

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0.2 Safari/604.4.7.

Link to the challenge:


#2

The class attribute should only have class names in it. There should be no CSS style properties/values in it. All of the CSS definition takes place inside the style tags. The !important keyword is used in the definition and not the class attribute.

You might want to review how to use classes with the following challenge.