Opacity CSS Code

New browsers are good to opacity, but old ones need some special codes to have transparent elements.

.opacityBlock {
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; /* for IE8 */
filter:alpha(opacity=20); /* for IE7 */
-moz-opacity:0.2; /* Old Mozilla */
-khtml-opacity: 0.2;  /* Safari 1 */
opacity:0.2;  /* New Browsers and IE9  */
}

Remember that opacity will have an effect on all child elements inside opacity changed element.

3 Responses to Opacity CSS Code

  1. Reno says:

    Knocekd my socks off with knowledge!

  2. I’m pretty new at this place and adore the design, could you let me know me where you bought this theme? You can contact me on my e-mail…looking forward to hear from you
    My blog is Anxiety attacks.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">