ie-css3.js is a project by Keith Clark which enables Internet Explorer to identify CSS3 pseudo selectors & render any such styles.

Including 2 JS files (DOMAssistant is required too) into your web pages & inserting CSS files with the <link> tag (inline styles are not supported) will make the rules work.

ie-css3.js

How does it work?

ie-css3.js downloads each style sheet on the page and parses it for CSS3 pseduo selectors.

If a selector is found, it's replaced by CSS class of a similar name. For example: div:nth-child(2) will become div._iecss-nth-child-2. Next, DOMAssistant is used to find the DOM nodes matching the original CSS3 selector and the same CSS class is applied them.

Supported selectors are:

  • :nth-child
  • :nth-last-child
  • :nth-of-type
  • :nth-last-of-type
  • :first-child
  • :last-child
  • only-child
  • :first-of-type
  • :last-of-type
  • only-of-type
  • :empty

Alternatively, the popular IE7.js offers a similar functionality as well.

P.S. It doesn't support :not() pseudo selector.

WebResourcesDepot Feed