Solved

Combobox ignores z-index

Posted on 2002-04-25
8
256 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 33

Expert Comment

by:knightEknight
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:alanjacks
Comment Utility
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
Comment Utility
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
Comment Utility
Well, boo for select boxes.

Thanks for the info everyone.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
Actually in some older browsers all the form elements show through.

Cd&
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now