Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iFrame Transparency

Status
Not open for further replies.

WelshTeckie

IS-IT--Management
Aug 9, 2007
37
GB
Hi,

I have managed to get my iframe transparent and looking top. But now me being fusy I want the images in the i frame not to be transparent.

Is there a way of having the iframe with the transparency and selecting a few items inside that page to have a setting "transparency=none"??

thanks.
 
How are you achieving this transparency? Usually it is impossible to reverse transparency of children, when a parent item is transparent, but unless you tell us exactly what you're doing, we cannot fully help you.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Ok,

this is the iframe code

<iframe id="main" onLoad="calcHeight();" align="middle" name="main" marginwidth="0" marginheight="0" src="welcome.htm" frameborder="0" allowtransparency="true" background-color="transparent" height="1" scrolling="no"></iframe>

and css creates the transparancy here

#main
{
position: absolute;
filter:alpha(Opacity=50);
-moz-opacity: 0.50;
z-index:0;
left:10%;
width:80%;
background: #000;

}
.main
{
position: absolute;
z-index:0;
left:10%;
width:80%;
}
 
Unfortunately, what you want is not possible. Using the opacity CSS attributes, all children elements will inherit the opacity value and since the maximum value for opacity is 1.0 (or 100%), all children elements can only be as transparent as parent or moreso. Depending on your design, you could try using an alpha transparent png for background or try with completely transparent iframe (without any alpha transparency) and playing around with some absolutely positioned alpha transparent elements inside the iframe.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top