aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes menu comes behind of the combo(select tag) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "menu comes behind of the combo(select tag)" Watch "menu comes behind of the combo(select tag)" New topic
Author

menu comes behind of the combo(select tag)

Paul Phoby
Greenhorn

Joined: Sep 19, 2002
Posts: 13
I am using Intenet explorer only.
There are two frames(top and bottom)in screen. Top frame contains a menu which comes to second frame also while popping down. That works fine
If bottom frame is having any combo(select tag) then pop down menu comes behind of the combo.
Can u suggest any method by which combo(bottom frame)should come behind of the pop menu?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
with IE you can give them z-index properties
for the select tag use this
<select style="z-index: 0"
for the pop use this
style="z-index: 5"
Now netscape 4, this would not work, but you are only using ie
Eric
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
This is what MSDN (that means it is true for latest IE) about SELECT element:
"This element is a windowed control and does not support the z-index attribute or zIndex property."
This also means, that SELECT object will appear on top of any "DIV" or "SPAN", with no respect to theirs z-index.
The only element so far, that is able to cover SELECT in IE5.5+ is IFRAME.
So, one possible sollution is to change your menu to put DIV's and/or SPAN's into IFRAME, and size that IFRAME to fit menu.
Another one, works with IE4, i beleave, is to "hide" selects (using visibility="hidden"), when you open menu over it.
Third, and the most popular one, is to design your pages, so that, menu will never appear on top of SELECT.
Forth, and this is the one that I am using (well, it works only with IE5.5+ and NS6.2+ , but my company is fine with it), is to write your own SELECT element using DIV tag (visit my website in a couple days - I am going to put an example there. It also support expand/collapse for optgroups, and a lot more).
Fifth is to ignore this issue and wait that next IE version will have it fixed. (Call it "third party tool issue").
 
jQuery in Action, 2nd edition
 
subject: menu comes behind of the combo(select tag)
 
Similar Threads
'select' box interferring with my pulldown menu
Menu applet refresh problem - please help
PopUp Menu for JTree
Using JSP to redirect a client browser
dhtml menu across frames?