1 minute read

Recently I hear about IE 10 launch for windows 7. It’s sound pretty good to me. I have check if this have something good for me as a designer’s prospective. I start checking the code that is break in Ie9 or old browser. I found this code still not work in IE10 for me . Same way code work without any issue in Firefox and Chrome perfectly.

So all I want is writing Custom CSS for IE browser. Unfortunately it will not work In IE10. Microsoft have removed this feature in Ie10 see link1 link2 This means the code I have written for legacy support doesn’t work in Ie10.

This means this code will no longer work in IE10

<!–[if IE]>
<link rel=”stylesheet” href=”assets/ie.css”>
<![endif]—>

if you tried to use trick like jQuery.browser() then after jQuery 1.9 it’s no longer work too. see jQuery upgrade guide

script from http://www.impressivewebs.com/ie10-css-hacks/

<!–[if !IE]><!–<!–<![endif]—>

Will not work. But you can use this code by remove comments and direct run the code without comments. Write above code this way.

Now you have class ie10 on your web-pages’s html tag. Now when you write Css you can write custom css for Ie10 this way. This will only work in Ie10

UPDATE 17 MARCH

There is no need to add extra class .ie10 for Ie10. Because we need to run the ie.css in IE10 as what we do for earlier version. adding Ie.css dynamically is enough to solve this issue.

This code will add ie.css in Ie10. Cheers

Updated: