I am writting some html code which have following structure
<div style="position:relative">
<form>
<table>
<tr>
<td> <div id="Upper_Element" style="position:absolute;z-index:10"></div> </td>
</tr>
<tr>
<td> <div id="Lower_Element" style="position:absolute;z-index:-1"></div> </td>
</tr>
</table>
</form>
</div>
here Upper_Element is a YUI autocomplete text box (where suggestion are displayed when user enters anything like google) and Lower_Element is normal drop down box(<select>
).
In IE6 , When autocomplete suggestion are displayed Lower_Element is displayed over the suggestions list .
In other browser like IE8 its working fine.
I tried position and z-index attributes but no luck.
Please let me know what else can be tried.
Thanks in advance !
What do you mean by "Lower_Element is a normal drop down box"? Is it a
<select>
element or a<div>
as in your example? If it is a<select>
then you are seeing a very old bug that affects IE6 and has been asked/solved many times before, for example Z-Index problems with IE6 and html <select> element and iframe shimming or ie6 (and below) select z-index bugUse
position: absolute
andz-index
attribute to position one element above anotherRelated links:
Code
Positioning:
UPD
http://jsfiddle.net/vLx6X/