Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

menu comes behind of the combo(select tag)

 
Paul Phoby
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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").
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic