Transparent Html element cross-browser

October 24, 2007

Many times we we face the need of making a nice design that needs some sort of transparency. That’s something that makes your page clean and very usable. To do that just use CSS and the rest is a piece of cake. Though, it’s a bit of trouble because of different browser over the WWW.

For transparency, IE uses filter:alpha but mozila uses -moz-opacity

Anyways, if you need a HTML element to be transparent, create the below class and attach to it.

  1. .transparent
  2. {
  3. filter:alpha(opacity=60);
  4. -moz-opacity: 0.6;
  5. opacity: 0.6;
  6. }

 

Post a comment

Name (required)

Mail (will not be published) (required)

Website

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word