snarzeypants
02-20-2004, 11:41 PM
hey! im sarah and im having a bit of trouble with iframes. i managed to get the background of the iframe semi-transparent, but now the scrollbar and everything is a bit fuzzy. go here (http://www.geocities.com/gillystheman) to see what i mean. can it be fixed? thanks!
this may (or may not) work...
1. take this part out of your iframe tag...
style="FILTER: alpha(opacity=50)"
and replace it with this...
allowtransparency="true"
2. in the page that is being shown inside your iframe, add this to your css coding...
body {background-color:transparent;margin:0px;}
.transparent {background-color: #ffffff; filter:Alpha(Opacity=50); -moz-opacity:0.50; -khtml-opacity:0.50;}
.remove_filter {position : relative; -moz-opacity:1.00; -khtml-opacity:1.00;}
3. in the page that is being shown inside of your iframe still, add this after your starting BODY tag...
<div class="transparent" style="min-height:100%;_height:100%;">
<div class="remove_filter" style="font-weight:bold;">
4. again, in the page that is being show inside your iframe, add this before your ending BODY tag...
</div></div>
now, in theory, that should work in IE, Mozilla and Opera browsers. i have been working out the bugs to make this a cross browser effect. let me know if it flys for ya.
snarzeypants
02-22-2004, 05:00 AM
thanks so much pb! it worked perfectly and looks great. thanks for going to the trouble of helping me :D
jimcp
02-23-2004, 09:19 AM
np.
glad it worked.
If I look at the page http://www.geocities.com/gillystheman in IE6 it is transparent ok. But it does not render transparent in Opera 7(latest).
This whole transparency thing doesn't seem to work in my beloved Opera browser. :-( Do you agree with me that it just is not possible to make things like this work the same in Opera and IE or do you think there is some work around? I have to produce XHTML and CSS compliant code as well (...).
(What sites you can discover if you try to solve a problem. Looks very friendly here...)
Kind regards,
jim cp
i thought that i covered Opera with the khtml properties.
hm. guess not.
i don't have Opera so its hard to really test that for me.
i have sent a pm to you with a test page. if you can please look at it through opera and let me know, that would be great. thanks.
This whole transparency thing doesn't seem to work in my beloved Opera browser. :-( Do you agree with me that it just is not possible to make things like this work the same in Opera and IE or do you think there is some work around?
reading over the documents for opera, it does not yet support opacity rendering. when CSS3 becomes a reality, opera may have a type of support at that time, but it may be quite a long wait for that to happen.
IE and Netscape (Mozilla) have introduced their own versions (called proprietary) of coding in some areas. opacity support is one of these areas.
any type of current workaround may be to use png images, but then IE does not fully support the alpha transparancy in those.
transparent gif perhaps then? dunno.
good luck!