2

I'm using IE developer toolbar to analyze the DOM. My question is: when you check a certain element, let's say a paragraph, and that paragraph has a class that will set its background-color, but for some reason that class is overridden by another class or whatever, the class with that specific rule is strike through. How can I find out what class or parent element overrides it?

Example:

enter image description here

How can I find out whom overrides this background-color?

sergdenisov
  • 8,327
  • 9
  • 48
  • 63
user2818430
  • 5,853
  • 21
  • 82
  • 148

2 Answers2

2

You can find it in Computedbackground-color (need to expand it) in IE 11 Developer Tools: IE 11 Developer Tools

Or try to search it this way in Chrome DevTools: Chrome DevTools

sergdenisov
  • 8,327
  • 9
  • 48
  • 63
2

There's an established order of what overrides what. This is determined by the level of Specificity. There are four levels: element, class, id, and inline (from least priority to highest priority).

There's also the !important rule that can supercede the natural order. If there are multiple "!important", then the last one will win.

For more information: http://www.vanseodesign.com/css/css-specificity-inheritance-cascaade/

leocreatini
  • 676
  • 1
  • 9
  • 18