Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is preferred method to use newer CSS3 selectors in IE 8 and 7?

What is preferred method to use newer CSS3 selectors in IE 8 and 7? Fireofx, Chrome, Safari and Opera has better CSS selectors support compare to IE.

Is there a lightweight way to enable support for all secetors in IE. I'm not asking about feature detection (Modernizr) and to emulate CSS3 effects (PIE) in IE.

I'm asking to use all selectors in IE . So when I will be writing CSS I can optimized my css and html wisely use new selectors.

I already use Modernizr (including HTML Shim), jQuery almost in all projects. I know about IE7.js but I want to know if there is any other better alternative because IE7.JS sometime break the layout when we add it existing websites.

like image 497
Jitendra Vyas Avatar asked Jan 02 '12 09:01

Jitendra Vyas


2 Answers

Selectivizr is designed specifically to do this.

like image 75
Chuck Avatar answered Oct 10 '22 22:10

Chuck


I was a bit hesitant when I first started using CSS3 selectors because of browser-compatibility, but I find that when I use them it's only in very obscure situations where I am trying to achieve a pixel-perfect layout. If it turns out that I need to use them for something that is more important, I always turn to throwing on a few more classes in my markup, rather than relying on Javascript.

Some day, maybe we can comfortably use CSS3 selectors without worrying about people supporting them. We've already seen the downfall of one bad browser, so it's really only a matter of time.

Here's a related article on the subject that I like: http://www.alistapart.com/articles/understandingprogressiveenhancement

like image 33
Wex Avatar answered Oct 10 '22 23:10

Wex