views:

240

answers:

1

I currently use the non-standard "filter" method of rendering opacity on my site in addition to the standard way, since IE still doesn't seem to support it and unless I'm mistaken, opacity is part of CSS3 which isn't final anyway.

I guess this is more of annoyance, but Firefox correctly notes an error in parsing the value for "filter", as it should since it's not in the standard. This is great, except that I use this in about 10 places in my CSS sheet, so with every refresh when I'm debugging my JavaScript I have to swim through a sea of useless "filter" warnings before I see anything relevant to what I'm doing.

Is there a way to have Firefox specifically ignore a bit of CSS code and not throw out errors about it, if I know that it's nonstandard and browser specific? That would be the cleanest solution. I can't use the traditional server side method of just not outputting the code in the CSS file to begin with because I'm doing most of this testing offline.

Thanks

+2  A: 

I'd suggest looking into conditional comments, as documented at MSDN.

TML
That is what I do as well, load a specific IE stylesheet using conditional comments so that the real stylesheet does not get polluted with IE(6) specific things.
jeroen
Up-voted as I also do this.
David Thomas
This is the solution I ended up using on my site.
Nicholas Flynt