Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Combobox ignores z-index

Posted on 2002-04-25
8
Medium Priority
?
267 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

916 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