I use javascript and conditional comments. i.e. using jQuery.
It is offcourse better to use a seperate JS file.
This also has the disadvantage that you have to write everything twice since you put it in CSS for good browsers and again in javascript for IE6.