213

Well, this is pretty straightforward. If Chrome's Developer Tools is showing me that a style is overridden, how to see what CSS rule is overriding it?

I want to know if is there anything like "Show me what overrides this".

OBS: Please, don't point me to Firebug.

1
  • 2
    Chrome's Developer Tools also show you the overriding rule Dec 13, 2012 at 19:38

3 Answers 3

306

Use the Computed Style panel of the element inspector. Expand the property of interest to see the list of applicable rules, and which one won.

Chrome screenshot

7
  • For me the computed tab was open at default and therefore not listed as a tab, it should have had a header 'Computed', otherwise you could be looking for a long time.
    – MrFox
    Jul 20, 2015 at 8:44
  • 1
    The technique has changed a little as Chrome has advanced. Instead of 'Expand the property of interest' click the spy-glass next to the property and it will show which style won back in the Styles tab.
    – intotecho
    Nov 20, 2015 at 6:42
  • 3
    @intotecho: Chrome 47 has restored the expando in the Computed tab since the magnifying glass change sucked. crbug.com/496263
    – josh3736
    Nov 20, 2015 at 19:40
  • what if ALL of them are cancelled? Probably due to a script? How do you find out who did it?
    – Darkgaze
    Jun 23, 2017 at 8:28
  • 1
    @josh3736,maybe my css has !important but can't find anything overriding in Computed or elsewhere
    – derloopkat
    Dec 19, 2018 at 23:02
8

You can simply look at the ones with the same name which aren't striked out, remember the listing is by importance.

Or you can view the computed styles. They will be the actually applied styles.

2

crtrl + shift + c and inspect the element. Then find the style without a line through it, in the box in the down right corner.

the override is in most cases at the top (and without a line through it, as this style is the "winning" one).

1
  • 5
    It's not the case when a style is flagged as !important
    – Noone
    Aug 1, 2016 at 19:15

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.