Setting Opacity in MSIE, Too

© 2011, Martin Rinehart

Code Today

Modern browsers, with one exception, use the standard CSS opacity setting, a value between 0 (transparent) and 1 (opaque). = opacity; // most modern browsers =
            "alpha(opacity=" + (100*opacity) + ")"; // guess who

Old School

My library code is:

  1. more thorough, or
  2. obsolete but in a harmless way. = opacity;      // most modern browsers = opacity;   // original Mozilla = opacity; // older Konqueror, Safari =
            "alpha(opacity=" + (100*opacity) + ")"; // guess who

I'm pretty sure MozOpacity and KhtmlOpacity are now gone, but the occasional reminder of what life was like in the "good old days" may still be appropriate. (Gray hair, by the by, does not come with age. It comes from stress.)

Feedback: MartinRinehart at gmail dot com

# # #