Helpful Information
 
 
Category: HTML & CSS
Transparency Level

Hi,

I am trying to set an iframe background to be opaque. I have managed to get a transparent background for the iframe using:

style="background-color:transparent" within iframe.html

and allowtransparency="true" in the page where the iframe is defined.

Is there any way of setting the transparency to 40%?

DHTMLHELP

You coul;d always make a div that fills the whole iframe and give it a low z-Index, so it appears below everything else and then set the opacity of the div.

<div style="position:absolute; top:0; left:0; z-Index: -1; filter:alpha(opacity=50); background-color:green; width:100%; height:100%;"></div>

You can have the iframe transparent, but only in IE6.0

Check out my site for some examples...

Originally posted by x_goose_x
<div style="position:absolute; top:0; left:0; z-Index: -1; filter:alpha(opacity=50); background-color:green; width:100%; height:100%;"></div> [/B]

filter: alpha(opacity=50) will only work in IE4+ and not in Netscape. Netscape 4.7 doesn't support transparency at all (as far as I know) but to get it to work in Netscape 6 you need to add this as well:

-moz-opacity: 0.50;

so, the div style attribute would now look like this...

<div style="position: absolute; top: 0; left: 0; z-Index: -1; background-color: green; width: 100%; height: 100%; filter: alpha(opacity=50); -moz-opacity: 0.50;"></div>

Just thought I'd let u know ;)

~Quack










privacy (GDPR)