문제

One of my CSS rules does not show up at all in developer tools in ie8 (it works fine in normal browsers). Not even with strikethrough. enter image description here

I checked the CSS file through the browser and the rule is really there

enter image description here

What could be going on here and how to fix this?

Why don't I drop support for ie8 altogether?

Just for those who wonder:

I recently worked for the Dutch government and they're still on Windows XP. They recently paid Microsoft for prolonging support by another year or so. They have their computers locked against installing anything (Firefox, Google Chrome) so they basically force employees to use ie8.

As we speak, some 6% of all visits to my site are by ie8. My guess is that many of those are involuntarily on ie8. Dropping support will bother them but really won't help them to upgrade to a proper browser.

도움이 되었습니까?

해결책

IE8 might be having trouble parsing url(...)no-repeat with no whitespace separating the two values. See if adding a space there fixes the problem.

It's not clear from any spec if not having whitespace there is valid CSS; although the Jigsaw W3C CSS validator says it's valid, I don't really trust it. It's probably valid since url(...) and no-repeat are necessarily two separate tokens according to the grammar, but again, the spec does not spell this out very clearly in prose, so I can't say for sure.

I would strongly recommend having whitespace separating the shorthand values in any case.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top