Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Iframes and z-indexes

Iframes and z-indexes
Thread Tools
Oisín
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Mar 24, 2004, 04:08 AM
 
I plan on including a function in a website I'm doing, which would have a <div> placed on top of, among other things, an <iframe>. Naturally, to make sure it shows up right, I z-indexed the div and the iframe, and it worked just as it should in IE6, FireFox 0.8, and Netscape 7.1. But for some strange reason, it wouldn't work in Opera (7.23)!

I tried a few thingies here and there, and it seems that Opera doesn't allow anything to be placed on top of an iframe! The div (or anything else) is just placed behind the iframe - except that it is actually placed in front of the border of the iframe (the iframe has a 1px solid black border, and I can see the image in the div appearing on top of the border, but not the rest of the iframe).

I tried looking in the CSS specs, but I couldn't really find anything to say which is right, although I would think Opera's got it wrong; I mean, why shouldn't iframes be z-indexable like any other object?

Any way to work around this?
     
Chris O'Brien
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Mar 24, 2004, 04:18 AM
 
This is the same as the problem that plagued us all with ie5. Iframes are treated as windowed objects and so nothing, apart form other windowed objects, can go over it. You'll notice if you put a <select> above it, it'll drop down over it. This was fixed in ie5.5 (or was it 6???), but I had no idea Opera had this fault... Assuming it was the same fault.

If you look in a recent thread for how make a menu work in a frames page you should find an answer to this question. Although, i'm asuming the reason behind Opera not allowing you to do this is the same as ie5's old problem.

If it's just a div being put on top, you could just put the content on another page and use an iframe to z-index over the first iframe...
Just who are Britain? What do they? Who is them? And why?

Formerly Black Book
     
Oisín  (op)
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Mar 24, 2004, 04:48 AM
 
Originally posted by Black Book:
This is the same as the problem that plagued us all with ie5. Iframes are treated as windowed objects and so nothing, apart form other windowed objects, can go over it. You'll notice if you put a <select> above it, it'll drop down over it. This was fixed in ie5.5 (or was it 6???), but I had no idea Opera had this fault... Assuming it was the same fault.
It sounds like the same thing... I, on the other hand, didn't know it had also been an issue with IE5

If it's just a div being put on top, you could just put the content on another page and use an iframe to z-index over the first iframe...
Yeah, I thought about doing that too - it's just that part of the reason behind using a div was that then I could achieve a cool transparency effect that I could never achieve with an iframe... (The div isn't displayed until a link inside the iframe is clicked, then it appears, making it look like some kind of see-through pop-up or something - I guess it's not vital, but I like this effect)

But thanks anyway
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:57 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,