html - Find the browser version using css -


i have problem ie8, need apply css if browser not ie8

in html can using

<!--[if lt ie 9]> <link rel="stylesheet" type="text/css" href="ie8-and-down.css" /> <![endif]-->  <!--[if lte ie 8]> <link rel="stylesheet" type="text/css" href="ie8-and-down.css" /> <![endif]--> 

but want filter using css

is there way can instruct browser apply these styles if not ie8 ?

for example, how can make css not have impact in ie8?

@font-face{ //some css } 

conditional comments work (<!--[if lte ie 8]><stylesheet><![endif]-->), if want in stylesheet, there is way:

body {       color: red; /* browsers, of course */       color: green\9; /* ie */   } 

the important thing here "\9", has "\9". i'm not clear on why is.

edit: \9 hack isn't enough itself. exclude ie9, need :root hack:

:root body {     color: red\9; /* ie9 */   } 

other browsers besides ie might support :root, combine \9 hack if you're using target ie9.

ie6

lastly, have underscore hack, designers familiar now. rather * symbol, use underscore. target internet explorer 6.

body {  color: red; /* browsers, of course */  color : green\9; /* ie8 , below */  *color : yellow; /* ie7 , below */  _color : orange; /* ie6 */ } 

for more information

http://code.tutsplus.com/tutorials/quick-tip-how-to-target-ie6-ie7-and-ie8-uniquely-with-4-characters--net-10575


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -