Avatar of ottenm
ottenm
 asked on

z-index issue in IE: low <input> displays above high <div> when inside relative positioned div

The code below is generated by an AJAX look up control.  When someone starts typing into the txtCategory <input> box, the asbMenu div pops up and is populated with options that match what they're typing.  If I try to add multiple lookup controls to a page, the <input> boxes display on top of the popup divs, despite having input box z-index = 1 and popup div z-index = 15000.  

This is only broken in IE.  In FF and Opera they are displaying as I would expect.

When I remove the outer div''s "position:relative", the z-index works (but isn't where I need it to be).

Thanks for any suggestions.
<div style="position:relative; top:10px; z-index:1">
<input name="txtCategory" id="txtCategory" type="text" maxlength="100" size="10" 
  class="global" autocomplete="off" style="width:210px; z-index:1" />
<br>
<div class='asbMenu' style='visibility:hidden' id='txtCategory_Menu'></div>
<input type="hidden" id="txtCategory_SelectedValue" name="txtCategory_SelectedValue" value="">
</div>
                    
.global {  font: 10pt Verdana }
      
.asbMenu {
		border: 1px solid lightblue;
		background: #ffffff;
		position: absolute;
		padding: 5;
		white-space: nowrap;
		z-index: 15000;
	}

Open in new window

CSS

Avatar of undefined
Last Comment
Mark Steggles

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mark Steggles

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy