How to find out why CSS style is ignored?

I usually trace mine CSS stylesheetusing a web browser Chrome.

I see that some of my styles are ignored by the inspection window Chrome- the style is crossed out with a black line.

I don’t understand why they ignore him. I usually follow all styles, using my eyes to understand why this is ignored.

Can I find out structure information (inheritance) using Chrome or another way?

+4
source share
2 answers

Briefly, Specificity

From CSS Specificity: What You Should Know :

  • , CSS .
  • , CSS , , .
  • .
  • , .
  • , : , , + .
  • , : CSS.
  • , : CSS .
  • , , .
  • , , .
  • .
  • .
  • , .
  • , .
  • , .
  • .
  • 0, 0, 0, 0.
  • CSS CSS.

p a, , :

p.a { color: red;  }
 .a { color: blue; }

, !

, Tree View , , Chrome, . , . , , , "".

Chrome inspector

+6

Firebug Firefox, CSS.

, . "".

- , : Inline > Page > Sheet. , - , . , , .

, .

, #anID.aClass p.aClass, .aClass

Kyles

+2

All Articles