Click to See Complete Forum and Search --> : transparent iframe


diamonds
08-13-2003, 10:06 AM
Is there a way I can make the BACKGROUND of an iframe transparent(like a div)? I alredy know you can make the entire thing semi- or fully transparent with the filter:alpha(opacity=0); style.

Double07Devon11
08-13-2003, 07:50 PM
Originally posted by diamonds
Is there a way I can make the BACKGROUND of an iframe transparent(like a div)? I alredy know you can make the entire thing semi- or fully transparent with the filter:alpha(opacity=0); style.
Im not sure if this will work on an iframe but you can try: background-color:transparent;

PeOfEo
08-13-2003, 10:18 PM
If you already know how to do it with
style="filter:alpha(opacity=0);" then why dont you?

Paul Jr
08-13-2003, 10:57 PM
Originally posted by diamonds
Is there a way I can make the BACKGROUND of an iframe transparent(like a div)? I alredy know you can make the entire thing semi- or fully transparent with the filter:alpha(opacity=0); style.

What it seems he is saying, is that it is possible , and he knows how, to make it semi-transparent. Thus, he thinks that it is possible to make it fully transparent, but he doesn't know how.

Correct me if I'm wrong.

diamonds
08-14-2003, 12:51 PM
Say you have a picture for your page background. I want that to show through the iframe, like a div does naturally.

Double07Devon11
08-14-2003, 12:54 PM
Originally posted by diamonds
Say you have a picture for your page background. I want that to show through the iframe, like a div does naturally.
yeah, did you try the css "background-color:transparent;"? it should work....

PeOfEo
08-14-2003, 05:00 PM
but why not use filter:alpha(opacity=0); to do it? I am confused as to why.

David Harrison
08-14-2003, 05:42 PM
He doesn't want to use the alpha filter because that would make the entire iframe transparent, images, text, everything. He wants just the background of the iframe to be transparent.

diamonds
08-15-2003, 10:11 AM
background-color:transparent; dosent work for me when I attach it to the iframe tag:
<iframe border='0' style='background-color:transparent;'>your browser does not have iframe support.</iframe>

PeOfEo
08-15-2003, 08:54 PM
Ahhhh, I see the problem. I also have an idea style="background-color:transparent;" on the body of the page opening in the iframe, its worth a try. Also use double quotes, this " not this '.

Ice3T
08-17-2003, 02:55 PM
If you position your iframe absolutly and set the same background-image as the main page you can have them overlap exactly with background-position giving the illusion of a transparent iframe:


<body style="margin-left:0;margin-top:0;background-image:url(01.jpg);background-position:0 0">

<iframe src=alo.html style="position:absolute;top:50;left:150;background-image:url(01.jpg);background-position:-150 -50" frameborder=1>

(frameborder was left at 1 to show my point)

Ice3T
08-17-2003, 02:59 PM
and also this should be done for it to work:

style="background-color:transparent;" on the body of the page opened in the iframe, as PeOfEo said.