Dropdown menu

Tim Marman replied to my issue on Dropdown controls:

As Pascal discovered the hard way, Internet Explorer always stacks something like a SELECT drop-down list on top of a normal HTML element, regardless of what z-index you use for each of them.

That is because SELECT (and a handful of other elements) are windowed controls, and, basically, all windowed controls will always paint themselves on top of a windowless control. Even the highest windowless element is always going to be under the lowest windowed control.

So why with Netscape and IE for Macintosh, I don't have the problem ?

One solution you mentioned - though perhaps not the most elegant - is trying to detect any such windowed controls and hide them. This may be a reasonable solution if you're only having these in one place and you know exactly what windowed controls might be there. It becomes a bit more complicated if you have to try to detect that.

That's probably the solution I am going to implement, my dropdown lists controls are always at the same spot. The thing I have to test is that the menus are client-side and the controls obviously server side, so surely some headache with Javascript.

You have a few other options though. If you are targeting IE5.5+, you can use the popup object. The only caveat here is that you can't have form elements in there, because the popup (and thus anything inside it) cannot gain focus.

Tim do you know some links on that. I received one or two but just to be sure I cover everything ;-)

Another solution is to use an IFRAME to house your popup. Apparently, in IE5.01+, the IFRAME is a unique control that can be both windowed and windowless, and will render as expected. 

Same than before, some links on that will be appreciated.

Hope this helps.

Yes Tim it give me some leads !

No Comments