Hi, Is there a way of using the hack <!--[if IE]> <![endif]--> within css code, or is there an alternative? to comply with recent versions of IE and Mozilla
Create a separate style sheet for IE, and place the following: <!--[if IE]> <link rel="stylesheet" type="text/css" href="path/to/ie_stylesheet.css" /> <![endif]--> at the end of your pages' <head> section. Now, the code within this separate style sheet will only be called by IE. (alter your href path to suit your site, of course)
Also make sure that the conditional comment (which is what it's called) comes after your regular stylesheet, so that IE can take advantage of the "cascading" part of "Cascading Style Sheets" . If you need to target IE 5.01, IE 5.5 and IE 6 (but not IE 7) then use [if lt IE 7] instead of just plain old [if IE]. The closing conditional comment tag would remain the same.