CSS alpha Transparency

2 replies [Last post]
jose
jose's picture
User offline. Last seen 35 weeks 13 hours ago. Offline
Joined: 03/30/2009

Opacity (alpha transparency) in css is handled differently for all browsers, this would require four separate statements in the document css. One advantage is that they do not interfere, and to work with the four is no problem because we do not have to worry. The statements are:

.my-transparent-class {
        filter:alpha(opacity=50);
        -moz-opacity:0.5;
        -khtml-opacity: 0.5;
        opacity: 0.5;
}

opacity: 0.5; This is the "most important" one because it is the current standard in CSS. This statement works in Firefox, Safari, and Opera.

filter:alpha(opacity=50); This is for Internet Explorer

-moz-opacity:0.5; This is for old versions of the Mozilla browsers like Netscape Navigator.

-khtml-opacity: 0.5; Ths is for old versions of Safari (1.x)

admin
admin's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 03/24/2009
Yes, you're right. Life

Yes, you're right. Life would be easier without Explorer lol

liquidgraph (not verified)
liquidgraph's picture
Why does IE always have to

Why does IE always have to make my life so difficult... Aargh! Thanks, this is just what I need to make it work.

--
“When everyone can tell you the truth, they lack reverence for you.” - Machiavelli
Web developer at your service. Current project: Annuities