CSS3 Pseudo Selector Emulation For Internet Explorer 5-8

ie-css3.js is a JavaScript library that allows Internet Explorer to identify CSS3 pseudo selectors and render any style rules defined with them. Simply include the script in your pages and start using these selectors in your style sheets.

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. Robert Nyman’s DOMAssistant is also required, which is used to find the DOM nodes matching the original CSS3 selector and the same CSS class is applied them. Finally, the original stylesheet is replaced with the new version and any elements targeted with CSS3 selectors will be styled.

Supported Pseudo Selectors

  • :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

Developed by Keith Clark; ie-css3.js is available for download for under MIT License. You can find further information & download on Keith Clark’s Website.

Stay Updated

If you found this post useful, consider subscribing to our RSS Feed! You can also stay updated by following us on Twitter and Facebook or by subscribing to our FriendFeed.

Bookmark / Share

Bookmark and Share

Read More

SIMILAR/RELATED POSTS:

PREVIOUS POST:

NEXT POST:

Reader Comments

2 Responses to “CSS3 Pseudo Selector Emulation For Internet Explorer 5-8”
  1. Konstantin says:

    Heh, so we’re back to hacking IE? OMG when is this going to end?

    • Saud Khan says:

      Konstantin,

      Good to see you back in action. CSS3 pseudo selectors are so powerful – this is something we could not ignore.

      Take Care

Leave Comment

 
 

Stay Updated, Subscribe to RSS Feed

 
 
 
 

Blogroll

 

Sponsored Links