Entry
Why do my select menus show through my layers?
Sep 25th, 2002 15:52
nick j, Ben Tyler, jsWalter,
Select elements are window elements that ignore zindexing.
You can either move your select elements away from any layers or turn
the visibility property of the css to hidden. This can be done by either
(A)putting the select (and therefore the form) in a layer and turning
the layer's visibility to "hidden", or for later browsers, (B)you can
access the css and turn the visibility for all select elements on a
page to "hidden". For (B), you must first put something like this in
your css:
select{
visibility: visible;
display: inline; /* only necessary if you need NS6 as well- see note
below */
}
Your friends at Apple Computer have already done the heavy lifting for
the (B) solution:
http://developer.apple.com/internet/javascript/styles.html
NOTE: Netscape 6 continues to show scrollbars for select boxes with a
size
greater than one, but it does handle drop downs fine without any help.
IE needs the fix you will find at the above URL for all select elements.
If you absolutely must solve the problem for NS6 as well, you can
access the display property and set it to "none", but you may not like
it. It will probably cause elements of the page to shift around since
you just "erased" an inline element.