Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there any IE8 only css hack?

For Internet Explorer 8 (IE8) I'd like to use the following CSS:

color : green; 

I would like to apply a hack which only affects IE8, not to IE9, IE6 and 7.

like image 242
Jitendra Vyas Avatar asked Jun 15 '10 06:06

Jitendra Vyas


People also ask

Does IE8 support CSS?

Most notable is that IE8 Supports all of CSS2.

Is IE8 still used?

Microsoft officially stopped supporting IE8, IE9 and IE10 over three years ago, and the Microsoft executives are even telling you to stop using Internet Explorer 11.


1 Answers

Use conditional comments in HTML, like this:

<!--[if IE 8]> <style>...</style> <![endif]--> 

See here: http://www.quirksmode.org/css/condcom.html

You can test for IE versions reliably and also be sure other browsers won't be confused.

like image 107
Palantir Avatar answered Sep 20 '22 06:09

Palantir