1

I am using pseudo classes and they work fine everywhere except IE7. I would like to know if there is any way to make them work in IE7.

Mike
  • 3,348
  • 11
  • 45
  • 80

3 Answers3

1

You can detect user-agent on the server and output different HTML to different browsers.

For PHP, you can use Browser.php (for example), or simply look at $_SERVER['HTTP_USER_AGENT'] variable

Other than that - only Javascript, sorry.

EDIT: Simplest way (no JS coding needed) - is to use Selectivizr - http://selectivizr.com/

It's the CSS3 emulation library for IE6-8

wizzard0
  • 1,883
  • 1
  • 15
  • 38
1

Here is the link on stackoverflow and the same question, somehow I am sure you'll find the answer you want here.

:after and :before css pseudo elements hack for IE 7

Community
  • 1
  • 1
rmagnum2002
  • 11,341
  • 8
  • 49
  • 86
0

No can do...

if it is absolutely necessary to utilize those pseudo elements in that browsers, you'll probably have to load a js file to correct the problem: http://code.google.com/p/ie7-js/

shaselton
  • 578
  • 4
  • 10