voodish logo
tweet rss book of faces Linked In

Transparent DIV SPAN for all browsers

How to create a transparent DIV / SPAN to work in all browsers including Internet Explorer and Firefox. Internet Explorer uses filter and firefox uses moz-opacity; here’s the CSS and HTML code to use.

CSS Code

.transparent
{
   filter:alpha(opacity=60);
   -moz-opacity: 0.6;
   opacity: 0.6; 

}


HTML Code

<div class="transparent">A transparent div.
</div>

There you have it a nice shiny semi-opaque, transparent div.

Related Articles

Comments RSS Feed

No Comments Yet

You can be the first to comment!

Leave a comment