Use CSS3 Pseudo Selectors With IE: ie-css3.js
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.
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.
- Tags:
CSS3 IE
- Filed under: Design, MIT License, Xhtml & Css
- 3 Comments
















3 Responses for "Use CSS3 Pseudo Selectors With IE: ie-css3.js"
I hate IE
Thanks for sharing the tip-bit, it will help with development.
Its really a great post. I love your site and content of site very much.
thanks again