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


valhala_90
04-29-2003, 04:09 AM
Does anyone know how to make the background of an IFrame transparent?I have a background on my site with an Ifram over the top and I want to be able to see the background through the Iframe but dont know how to do it or if it can even be done!

If anyone can help i would be really grateful!

khaki
04-29-2003, 07:13 AM
hi valhala_90...

i'm not sure how far back this is supported but try this:

allowtransparency="true" background-color="transparent"

if anyone would like to test that to see which browsers allow it and which don't... please report back with that info.
thanks...
edit:I figured that I better edit this to avoid even more confusion and frustration than is sure to be experienced with this transparency thing to begin with:

This is how it is "supposed" to work:


<iframe name="yourFrame" src="yourFile.htm" allowtransparency="true" style="position:absolute; top:50; left:50">

This goes in the iframe src file:
<body style="background-color:transparent">

I would definitley like to hear back from anyone who has gotten this to work for them (and which browser they viewed it on).

;) k

valhala_90
04-29-2003, 08:10 AM
YOU ARE A GENIUS!!!

It works in IE5! Ive been trying to figure that out for about 2 months now thank you!

Did you already know that or did you find the script on a website?

khaki
04-29-2003, 08:21 AM
Did you already know that or did you find the script on a website?Actually, I was born with that knowledge (lol) ;)

no, but seriously... i was a spectator to a raging debate among 2 Russian programmers who nearly started throwing fists over this issue :eek:
(don't ask!)

anyway... i've never forgotten it since then (although I have not used it because it does not seem to work with much consistancy across a wide range of browsers).

so... which v5 did you test it on?

oh... and just a quick fyi:
you probably caused many people to spit milk out of their nose when you called me a genius :rolleyes:
(but thanks anyway :) )

;) k

valhala_90
04-29-2003, 01:50 PM
Originally posted by khaki

no, but seriously... i was a spectator to a raging debate among 2 Russian programmers who nearly started throwing fists over this issue :eek:
(don't ask!)


How sad!



so... which v5 did you test it on?



tested it on 5.5.



oh... and just a quick fyi:
you probably caused many people to spit milk out of their nose when you called me a genius :rolleyes:
(but thanks anyway :) )


Im sure they will get over it! why would they react like that though?

DaveSW
04-29-2003, 02:15 PM
Originally posted by valhala_90

why would they react like that though?

I mean to say :eek: as if we would LOL

Khaki: what if they weren't drinking milk??
LOL

khaki
04-29-2003, 02:27 PM
Khaki: what if they weren't drinking milk?? ...it was too early in the day for margaritas! :)

;) k