Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mac IE5 transparent background won't work

Status
Not open for further replies.

TheDust

Programmer
Aug 12, 2002
217
US
I have a piece of Javascript to detect what OS and browser a user has and I load a CSS file based on that. However, the CSS I'm using for Mac users isn't working.

This is all taking place in an iframe inside of the main page. For IE and Mozilla I have a DIV with a semi-transparent background. For Mac and Opera users, I just want it to be completely transparent to see the background of the main page. I've tested the Mac CSS on Windows and it works fine, but on Mac IE5 I just get a white background instead of a transparent one. Here's the CSS I'm using:

<code>iframe.css (applicable to all users)
----------
body {
margin : 3px 3px 3px 3px;
background : transparent;
}
.contentFrame {
position : absolute;
top : 0px;
left : 0px;
background : transparent;
z-index : 2;
padding : 5px;
}

mac.css (Mac and Opera users only)
-------
.seethrough {
width : 100%;
height : 392px;
position : absolute;
top : 0px;
left : 0px;
background : transparent;
z-index : 1;
}</code>

Here's an example of an HTML page that is using this method:
It will probably be easier to understand what I'm going for when you see that page. Any ideas what CSS is invalid here?
 
Try adding the "allowTransparency" attribute to your iframe, with a value of "true":

Code:
<iframe allowTransparency="true" ...

This value defaults to false, and I don't know if the CSS property overrides this or not. More info can be found at:


It might be worth trying the examples given on that page on a Mac, too.

Hope this helps,
Dan
 
The iframe already is set to allowTransparency="true"... anyone have other ideas? This one is pretty baffling to me...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top