View Full Version : Transparent background shows WHITE
heres my dilemma. i currently use Firefox as my default browser. i use frames on my website on every page. and in those frames i use the 'Scrollable IFrame' script. everything is fine there, no questions regarding the script. however, i set the background of the frame loaded html pages to be transparent, so the text i put in the scrollable frame would look like it was part of the graphic background of my website. The transparent background shows up in Firefox, but when i look at the website in Internet Explorer, the background is WHITE instead of transparent!! can anyone explain why this is happening, and what i can do to make the transparent background work in BOTH browsers???
heres a link to my website, for visual description.. http://www.ikonmusic.net
04-12-2005, 08:49 PM
[...] when i look at the website in Internet Explorer, the background is WHITE instead of transparent!! can anyone explain why this is happeningThe answer is, quite simple: IE is crap. There's no other way to put it.
what i can do to make the transparent background work in BOTH browsers???You have to include the proprietary allowtransparency property, set to true:
<iframe src="..." allowtransparency="true"></iframe>The background-color property of the iframe element will then default to transparent, but it can still be set to any legal value.
okay, that helped. got everything squared away on the subpages. but now the only issue is the iframe scroller on the homepage> http://www.ikonmusic.net ....when looking at that page in firefox, its fine, but again in IE, the background is white..i used the IFRAME scroller script for that> http://www.dynamicdrive.com/dynamicindex2/iframe-scroller.htm ...which carries the external.htm file for the frame loaded page...i put the tag in the iframe itself, like you said:
<iframe id="datamain" src="'+iframesrc+'" width="320px" height="100px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
but its still showing up white, unlike the subpages where it worked in every other instance..im thinking i might have to alter the code in the external.htm file itself...any suggestions?
04-13-2005, 12:12 PM
but its still showing up white, unlike the subpages where it worked in every other instance..im thinking i might have to alter the code in the external.htm file itselfYes, you do. Without a correct DOCTYPE, user agents will fallback to quirky behaviour. In this mode, IE defaults to a white background not a transparent one. Either set a DOCTYPE at the very start of the document:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<!-- ... -->or explicity set the background-color CSS property to transparent:
<!-- ... -->
</head>Either way, you still need the proprietary allowtransparency attribute.
thank you. worked just fine
07-27-2005, 03:38 PM
hi thanks for that transparency method. Just so you guys know, The method above does work in I.E 6, Netscape 7.2, Mozilla Firefox 1.04, but does NOT work in Opera 8.01 !!!! 3 out of 4 major browsers is pretty good, but is there some additional code i can add that will make it work in Opera as well? anyone got any ideas?
Opera have removed all support for transparency.
05-02-2006, 03:41 AM
Help! My webpage is http://homepage.mac.com/jrthib1/SBHS/ i am redesigning the website for my school. I tried the workarounds that were posted in this thread but none worked for me. any suggestions what i can do?
Opera hasn't had a massive change of heart and decided to support transparency in the last few months.
Perfect!! I had the same problem and this solution saved a lot of my time! Thank's a lot.
07-06-2006, 12:01 PM
had the same,I tried, everything is o.k., thanks
02-15-2007, 04:04 PM
at least it does on v9.01
02-28-2007, 12:39 AM
IE defaults to a white background
IE defaults to a gray background.
It depends on the system theme.
05-31-2009, 01:08 AM
I have the opposite of the problem!!!
I am using frames [Tabbed documents viewer] .
The background of my page is gray, I found that some websites , when I browse it in my frame, it comes out with a gray background!!!! instead of white?!!
How Can I edit the code to make the background of the frame to be WHITE ONLY!!!
Thanks in advance,
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.