Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Combobox ignores z-index

Posted on 2002-04-25
8
Medium Priority
?
265 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 400 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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 the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

664 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