View Full Version : Transparent IFrame


lovely_sugar102
12-01-2002, 04:55 PM
I postioned an IFrame and I want it to be transparent so i can see the background beind it. Here is my code:

<!-- "Aqua Skies" layout made by Sugar~~ http://www.angelfire.com/al4/home0 -->
<STYLE type="text/css"><!--
A:link{color:blue;text-decoration:none}
A:visited{color:blue;text-decoration:none}
A:active{color:0099FF;text-decoration:none}
A:hover{color:0099FF;cursor:crosshair}
--></STYLE>
<style type="text/css">
<!--
#image { position:absolute; visibility:visible; left:0; top:0; width:0; align:right }
#frame { position:absolute; visibility:visible; left:8; top:106; width:700; align:center}
-->
</style>
<IMG SRC="http://publish.hometown.aol.com/candy1020201/images/layout_aquaskies.gif" BORDER=0 style="position:absolute; left:0; top:0;">
<div id=frame>
<iframe FRAMEBORDER="0" BORDER=0 width=448
height=272 src="http://www.angelfire.com/al4/home0/home.html" name="frame" scrolling=yes allowtransparency="true"></iframe>
<div style="position: absolute; top:20; left:496">
<font face="brush script mt"><font size=5><a href="home.html" target="frame">Main
</div>
<div style="position: absolute; top:85; left:495"><a href="you.html" target="frame">For You
</div>
<div style="position: absolute; top:155; left:490">
<font face="brush script mt"><font size=5><a href="me.html" target="frame">About Me
</div>
<div style="position: absolute; top:225; left:490">
<font face="brush script mt"><font size=5><a href="site.html" target="frame">The Site
</div>

Thanks a lot!

starlet
12-01-2002, 06:57 PM
Try useing style="filter:alpha(opacity=50)" instead of the allowtransparency code....also your links are missing the </a> tag :)

COBOLdinosaur
12-01-2002, 07:29 PM
allowtransparency="true" background-color="transparent"

You need both.

flavist
02-25-2003, 09:30 PM
simple example of what should be a transparent iframe (http://ndimensional.org/test/iframe.html)

Sorry if I'm beating a dead horse here, but these solutions don't seem to work.

The link above should be to a page with an iframe that has a transparent background and yet it is not. Is this something that used to work in IE5.5 and no longer works with IE6?

Is anyone able to make a transparent iframe with IE6?

COBOLdinosaur, I think I remember using your attributes in years past.

flavist
02-25-2003, 09:38 PM
never mind.

I was missing the style declaration in the external file
body{background-color: transparent}

lefty
02-25-2003, 09:39 PM
I know they work, because I've seen them done before. Try searching (http://www.lissaexplains.com/forum/search.php?s=) the forum, there have been many solutions to the problem.

I personally don't trust codes like those mentioned here, I'd rather cut out part of an image and set it as the background of the iframe... but you'll get plently of those suggestions, too, on your forum search. :)

EDIT: haha never mind, I suppose. :P