question about IE filter: alpha(opacity=50); command
I am trying to program web code across multiple browsers: Internet Explorer, Firefox, Google Chrome, Opera and Safari. The firefox css rule
{opacity: 0.5;}
will not run on internet explorer, which requires
filter: alpha(opacity=50);
which throws an error in firefox.
Without leaving css, is there a way to include one opacity command, or a number of them while producing no errors, in an html script web file?
All Replies (1)
It is not really a problem that the unrecognized filter code shows as an error in the Tools > Error Console. Firefox will ignore rules that are not recognized.
You need to add both rules or maybe more, if Safari or Opera also require their own code, if you want to support all browsers. You can do some browser sniffing for Gecko and load a specific stylesheet for Firefox, but that shouldn't be needed in most cases.