I’ve stopped using CSS hacks for different browsers and instead favour the “conditional comments adding classes to html tag” approach.
Which brings me to my question. How would I write this ie8 hack without the hack?
.grab-cursor{cursor:move\0/;}
I’m looking to implement:
.ie8 .grab-cursor{–non hacked code here– ;}
(I never really understood css hacks so I’m glad not to have to use them now!)
You really don’t need any hack or comment here, it should work pretty well across all browsers (see http://www.quirksmode.org/css/cursor.html). What exactly is the issue you are trying to solve?
EDIT
To answer the general question of how to apply certain styles to certain versions of IE without hacks, if you use the conditional comment block
you have various possibilities.
If you just want to fix a general Internet Explorer problem, you can use
and you’re set. If you want to fix something just for, let’s say IE7, you can use
but the best way to fix certain problems would be to use modernizr ( http://www.modernizr.com/ ), so you can do stuff like
I would also recommend http://leaverou.github.com/prefixfree/, as it allows you to have
instead of