Achim
Achim

Reputation: 15692

Find out why a CSS rule is "disabled"

I have a CSS file which is not written by me, but I have to change stuff. My problem is a line like this:

list-style-image: url("../images/pfeil.png");

The path to the image is correct, but it's not displayed. I used Firebug to check which styles are applied and I see the line is stroke through. According to the documentation, that means that it's overwritten by another rule.

Is there a way / tool to find out, which rule is overwriting the line above?

Upvotes: 4

Views: 884

Answers (2)

Dale
Dale

Reputation: 1301

Open your page in chrome, hit ctrl, shift I to open developers console. On the right, there should be an accordion thingy with one of the options being "Computed Style". Open that, click on show inherited, find the setting your concerned about, click the little arrow next to it and it should open up and tell you where the computed setting is coming from. Let me know if that does it for you.

Upvotes: 1

Jakub
Jakub

Reputation: 20475

They are not disabled. These entries have a strike through them to signify they have been reset or overwritten by a newer rule (one loaded after this style sheet for instance).

CSS styles are loaded in order of inclusion on the html page, with inline styles taking priority over CSS sheet definitions.

Firebug will show you which one has overwritten this one if you just review all CSS acting on that element. Just look for any other list-style-image: listed.

Upvotes: 1

Related Questions