Search code examples
htmlcssinternet-explorer-9

How to target ::before and ::after pseudo elements in Internet Explorer 9 Developer Tools?


When inspecting elements in IE9 Developer Tools I can't see the pseudo elements I have defined in my CSS in the HTML pane: IE9 HTML pane

However I can see them in the CSS pane, but they have strike-through suggesting the styles are being overridden, and hence have no effect when modifying them. IE9 CSS pane

How do I target ::before and ::after elements for inspection in IE9?

Note: this may appear to be a duplicate of this question but in my case the elements are div container elements, so I don't think the answer to that question applies here.


Solution

  • Quoting from another answer:

    IE 9 supports the notations ::after and ::before (with two colons) in “standards mode”. In “quirks mode”, it does not.

    https://stackoverflow.com/a/14145917/5973334

    So the only possible reason would be for something in you code to have activated the “quirks mode”