When I was looking at a JavaScript created by jscheuer1 (John), I noticed something about z-index in a style attribute. What does z-index do?
-magicyte
When I was looking at a JavaScript created by jscheuer1 (John), I noticed something about z-index in a style attribute. What does z-index do?
-magicyte
If X is width, and Y is height, what must Z be? Depth, of course!
If any elements are overlapping, they will stack accordingly based on their z-index. The ones with the higher index will be higher up, the lower index ones will go to the bottom.
Thanx guys! Man! I never knew that. Finally! I can make images OVERLAP! It's a miracle.
-magicyte
Notice that certain elements like select boxes and activeX in IE always have the highest z-index. There's nothing you can do about that.
===
Arie Molendijk
I'm not sure what you mean by Active X, it is such a broad category. Something as simple as an element with style filter(s) in IE is technically Active X, but it will still follow the rules and peculiarities for z-index stacking. The select element bug was corrected in IE 7. Iframe in earlier Opera had this problem as well. All Flash in all browsers exhibits this issue unless its wmode is set to transparent. Other object and embed (deprecated) elements can too (in many browsers), but there is often no equivalent to wmode for them, or none that is widely known.
One caveat for z-indexing is that (in the broadest use, including browsers that do not do fixed positioning for all elements, or that do not do it correctly with regard to z-indexing), the elements involved in stacking must both have either position absolute or relative. One can be absolute, the other relative, but each element involved in the stacking process must be one or the other. This is not required in all browsers, but in enough of them to make it an important requirement.
There are other issues involved, but the above takes in the major ones.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Ah well, yes I recall discussing that (or something similar) with you in fact. That (what we were discussing before with the Google page object) would fit into the category of objects that have no wmode setting or equivalent that is widely known, but in this case only as regards IE because it happened to work as desired in other browsers (iframe worked for it in IE though as I recall).
However, I'm not certain what we were discussing before was an Active X object. It appeared to me to merely be an ordinary object element.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
We were discussing this. In IE, there seems to be no way of having windowless elements on top of <object type="text/html"></object>. Notice also that <object type="text/html"></object> provokes an 'ActiveX prompt' in IE when used locally.
===
Arie.
I'm not sure if that makes it an Active X object. IE gives exactly the same warning for any javascript.
I think the warning for the script tag and for the object tag are similar. You can use an object tag to show an image - harmless. And a script tag to just do adocument.write('Hello world!');- equally harmless. But either one, script or object tag, can be used in IE to run controls on your computer that will trash it. The programmers of IE just never bothered to write in code to tell the difference between harmless and harmful scripts and objects, while apparently they have to a degree for style tags (where only filters and behaviors will trigger this same Active X warning, but then indiscriminately once again for both safe and for harmful ones).
Last edited by jscheuer1; 07-15-2008 at 01:12 PM. Reason: add info about style
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks