Click to See Complete Forum and Search --> : z index problem


drewex
11-25-2003, 06:57 PM
Hi all

Hi i founded the line below.
QUOTE]The property does not apply to windowed controls, such as select objects.[/QUOTE]
Is there a way to hack it. i need to put some thing over select object. maybe using some other kind of style to do this.

gil davis
11-25-2003, 09:03 PM
See http://www.webreference.com/dhtml/diner/seethru/index.html

dragle
11-26-2003, 08:33 AM
While I still think hiding the elements in question is the best overall solution, I did come across an interesting hack related to this problem a week or two ago that works only in IE5.5 and IE6. Windowed elements will cover other windowed elements, as described in this MSDN article:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui05072002.asp

And that got me thinking about IFRAMES, which are windowless beginning in IE5.5. It seems, however, that in IE5.5/6, you can place an absolutely positioned IFRAME over the select (and possibly any other windowed element) and it will obscure the select box, provided the IE specific allowTransparency attribute is set to false (the default) on the IFRAME itself. Then you can place your dynamic element over the IFRAME (and you can size the IFRAME to the same size as the element). While it seems illogical, the IFRAME ends up masking the select, while the dynamic element appears over the IFRAME. If you then hide the IFRAME the dynamic element then slips beneath the select box! Presumably, of course, you could also load your dynamic content within the IFRAME itself, and it should then cover the select. That may or may not be a bit trickier, depending on exactly what you're trying to do with the dynamic object itself.

Usage on this technique would be somewhat limited since it appears to work this way only in IE5.5 and 6. But I have it on my list of things to play with when I get more time...

Cheers!