|
|
Iframes and z-indexes
|
|
|
|
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status:
Offline
|
|
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?
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|