473,320 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

IFRAME z-index bug with MHT files as src

I understand that as of IE5.5 iframes respect the z-index style
property. However I have noticed some odd behaviour when the iframe's
src is set to an MHT web archive instead of an HTML file.

For example: I have a DIV containing an IFRAME and an IMG, whose
z-index is 1. I have a second, identical DIV except this one's z-index
is set to 0. I would expect the first DIV (including the IFRAME and
IMG) two be rendered above the second DIV. When the src of the IFRAMEs
is an HTML page, this is true.

However if I use MHT files as the src of the IFRAMEs, the second DIV's
IFRAME (z-index: 0) appears above the first DIV's IMG (z-index: 1),
but not above the other IFRAME.

I assume this is because there are in face two z-order worlds. One for
windowed elements (e.g. IFRAMEs), and one for windowless elements
(e.g. IMGs). But why the different behaviour between HTML/MHT files?

Here is a screenshot using Win2k/IE6: http://tinypic.com/368zm

And here is the code I used:
<html>
<body>
<div style="position: absolute; z-index:1; left: 10; top: 10; width:
180; height: 80">
<iframe width="100" height="80" src="red.html"
scrolling="no"></iframe>
<img src="images/doll2.jpg" width="60" height="80">
</div>
<div style="position: absolute; z-index:0; left: 30; top: 70; width:
180; height: 80">
<iframe width="100" height="80" src="green.html"
scrolling="no"></iframe>
<img src="images/xltronic-avatar.jpg" width="60" height="80">
</div>
<div style="position: absolute; z-index:1; left: 10; top: 200; width:
180; height: 80">
<iframe width="100" height="80" src="red.mht"
scrolling="no"></iframe>
<img src="images/doll2.jpg" width="60" height="80">
</div>
<div style="position: absolute; z-index:0; left: 30; top: 260; width:
180; height: 80">
<iframe width="100" height="80" src="green.mht"
scrolling="no"></iframe>
<img src="images/xltronic-avatar.jpg" width="60" height="80">
</div>
</body>
</html>
Jul 23 '05 #1
0 6049

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Csaba2000 | last post by:
I want to be able to embed a single quote into an INPUT element within a dynamically generated IFRAME. The example below shows how the IFRAME is generated. Challenge: I'd like the alert box to...
4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
1
by: Martin | last post by:
There seems to be some strange behaviour when trying to get the scrollHeight and scrollTop of an iframe in IE6. I have tried several ways of getting these values when the iframe is written into...
7
by: Christopher J. Hahn | last post by:
I'm trying to use a script-generated form to submit to a script-generated iframe. The problem I'm running into is that the iframe is not assuming the name I assign it. IE6 on Win2000. FF1.0.2+...
3
by: Angel | last post by:
How do I get the reference of the IFrame from the asp.net webpage that is being displayed within that IFrame? In other words I have an IFrame in my page. Within that IFrame Set the source to a...
1
by: jaktharkhan | last post by:
Hi, I really really need help in trying to figure out how can I do a CloneNode on an Iframe where the cloned IFRAME clones with all its contents?. Basically what I am doing is dynamically building...
1
by: Z1P2 | last post by:
I would like to gradually resize an iframe in an onmouseover event. I can easily do it with an image, but when I try to do it with an iframe, it doesn't do anything. So first of all, is it possible...
23
by: vunet | last post by:
It is recommended by some sources I found to create IFrames in IE using document.createElement('<iframe src="#">') instead of document.createElement('iframe'). Why and what browser versions to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.