Solved

Combobox ignores z-index

Posted on 2002-04-25
8
261 Views
Last Modified: 2012-08-14
I have a page that uses a floating navigation menu that I pop open and close to configure a few of the parameters that affect the display.  I have things like # of rows, date range and the like.  Everything works beautifully except that comboboxes on the main page bleed thru to my floating menu.

My floating menu is similar to this example
http://builder.cnet.com/webbuilding/0-7690-8-6958380-1.html?tag=st.bl.3882.dir1.7690-8-6958380-1

It seems that no matter what I do with the z-index, the combo ignores it and just pushes right up to the top.

<span id='staticcombo' style='position:absolute;left:0;top:0;visibility:hidden' z-index=10>

Anyone see this behavior before and no how to make the combos behave?

Many Thanks, Alan
0
Comment
Question by:alanjacks
8 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 100 total points
ID: 6969389
That's they way they work. Form elements have a z-index of infinity. You can't put anything behind them.

The only way around it is to hide the ENTIRE form on mouseover. You can't hide just a piece of it, that causes a multitude of problems and isn't cross browser compatible.

Of course, when the form is hidden it's really hidden -- you can't do anything to it, like update values, or script it in any way. Not reliably, anyhow. You can script the DIV it is in, but not the form itself, while it's hidden.
0
 

Author Comment

by:alanjacks
ID: 6969428
The strange part is that only comboboxes bleed thru.  Input fields, check boxes, text areas all behave well by hiding when my div overlays them.  The combos are the only controls that won't allow an overlay.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6969446
ww is correct.  The select has a virtual z-index of infinity, which can not be modified.

The options are: Hide it as suggested;  move it out of the way; or redesigne the page to eliminate the positioning conflict.  It is that way by design, and there is nothing that can change the behaviour.

Cd&
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

by:knightEknight
ID: 6969451
wwwwoman is correct ... SELECTs are compound-objects, and as such they have been assigned a z-index of infinity and so nothing can be placed on top of them.  The other form elements you mentioned (textbox, checkbox, etc) are not compound objects and so you can change their z-index, or give another element (like a menu) a higher z-index.
0
 

Author Comment

by:alanjacks
ID: 6969454
The strange part is that only comboboxes bleed thru.  Input fields, check boxes, text areas all behave well by hiding when my div overlays them.  The combos are the only controls that won't allow an overlay.
0
 

Author Comment

by:alanjacks
ID: 6969463
The strange part is that only comboboxes bleed thru.  Input fields, check boxes, text areas all behave well by hiding when my div overlays them.  The combos are the only controls that won't allow an overlay.
0
 

Author Comment

by:alanjacks
ID: 6969473
Well, boo for select boxes.

Thanks for the info everyone.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6969482
Actually in some older browsers all the form elements show through.

Cd&
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help with this homework problem. 5 55
Show Ruler in Outlook 2010 STILL NOT SHOWING! 4 39
Do alert on select 6 26
Hide and Unhide Table 6 24
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question