How to set opacity in CSS?

div#transparent

{

    filter:alpha(opacity=75);

    -moz-opacity:.75;

    opacity:.75;

}


Posted on Wednesday, March 19, 2008 by | Comments (1) | Add Comment

Comments

Gravatar

Re:How to set opacity in CSS?

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.

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

New Comment

Your Name:
Email (for internal use only):
Comment:
 
Code above:

Categories

Recent Tweets

  • Simon Ince's Blog: Hierarchies with HierarchyID in SQL 2008 http://t.co/xSDwiF6rRS.
  • Visual Studio 2010 WAS painfully slow - CodeProject http://t.co/Usba1x6CZy

Valid HTML5