View Full Version : floating layer above the <select> box?
12-08-2002, 01:23 AM
I'm having a problem with layers and drop down menus (<select>).
When I have a <select> box on my page and a moveable layer the <select> box always appears over the top of the layer.
setting the 'z-index' to the layer is not working
I need the floating layer to appear above the <select> box.
NS 7 is OK the problem is IE 6
FYI its my first problem with IE normally its always NS
12-08-2002, 04:29 AM
hmmm there was a thread discussing this before with some intresting links, problem is i dont know what to search for to find it.
i think (yes ME think) that the form element will always be on top ....
12-08-2002, 12:28 PM
Yes, as far as I know you can't do anything about it. The problem is that the Select box is a seperate window in IE and not an actual HTML rendered element.
One thing I've done in the past was to use a text box instead which is rendered as an HTML element in the newer versions of IE and then put an invisible select over the top. Then when you click the text box your make the select visible and drop it down. Once a selection is made you copy the content of the select to the text box and you hide the select again. It's dirty but I believe I got it working...
If anyone does know a decent solution for it, I'd dearly like to know.
The only solution that I've found to be effective is to hide/move the select when needed.
<div id="selex" style="position:relative: left:0;">
movey layer code.
doc.getelbyid('selex').style.left = -9900px;
doc.getelbyid('selex').style.left = 0;
sort of thing. note: too lazy to type getElementById in its entirety - shown code was just to impart the concept.
12-08-2002, 06:33 PM
here's a thread on the same subject - although the only solution was to hide the box like Íkii suggested.... :rolleyes:
window.createPopop() should be able to create a widget which can hover above it. IE5.5+ only though.
You should also find that iframes will as they are completely different documents.
You might get away with just using one of them as a draggable layer. Not very NS4 friendly which to some viewpoints might be a good thing :)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.