KARPACH

WEB DEVELOPER BLOG

How to set opacity in CSS?

div#transparent
{
    filter:alpha(opacity=75);
    -moz-opacity:.75;
    opacity:.75;
}
Posted on March 19, 2008 by

Comments

Posted on 2/17/2009 09:42:53 AM by palgrave

This is funny. IE6/IE7 work with this rule fine.

When I try to compile in VS 2008, I get an error about VS not recognizing the filer: alpha(opacity=75); and opacity: .75; rules.

I use -ms-filter: alpha(opacity=75); and -ms-opacity: 0.75; rules and it compiles fine, but the images isn’t transparent.

With the first rules set, if I don’t compile, but view the page in a browser, no errors and the image is transparent. If I try to publish page to server, same compile errors.

I love Microsoft.