Oct
28

Cross browser transparency

By Sam  //  All browsers, CSS 3.0  //  1 Comment

Using transparency on your site can often help to bring the page to life. While the CSS 3.0 specification for opacity/transparency isn’t supported by all browsers they often have their own proprietary declarations.

#my-element{
opacity: 0.5;
-moz-opacity: 0.5;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
}

Using the example above we have successfully targeted Safari and Firefox 1.5+, earlier Firefox versions and Internet Explorer, respectively.

1 Comment to “Cross browser transparency”

  • Can’t count the number of times I’ve used this post as a reference. Should try to just remember it really.

Leave a comment

Sponsored links