开发者

zindex not working in IE

开发者 https://www.devze.com 2023-02-15 18:04 出处:网络
I have div with tranparent drop down,it acts as suggest box.Below this i have two input boxes.Whenever i call this suggest box,it overlaps other two input boxes. iam trying to control this using zinde

I have div with tranparent drop down,it acts as suggest box.Below this i have two input boxes.Whenever i call this suggest box,it overlaps other two input boxes. iam trying to control this using zindex property and position elements,But is is not working.

Any help appreciated.Thanks in advance.

After applying z-index,i didn't see my controls in jsp page. Below is the code:

<tr>
<td colspan="2">firstname</td>
<td colspan="2"><table cellspacing='0' cellpadding='0' border='0' style='position:relative;float:left;'>
<tr><td width="25%" style="position:relative;z-inedx:999'>
<input type="text" name="firstname">
</table></td></tr>
</td>
</tr>
<tr>
<td colspan="2">lastname</td>
<td colspan="2"><table cellspacing='开发者_运维问答0' cellpadding='0' border='0' style='position:relative;float:left;'>
<tr><td width="25%" style="position:relative;z-inedx:1'>
<input type="text" name="lastname">
</table></td></tr>
</td>
</tr>

<tr>
<td colspan="2">middlename</td>
<td colspan="2"><table cellspacing='0' cellpadding='0' border='0' style='position:relative;float:left;'>
<tr><td width="25%" style="position:relative;z-inedx:1'>
<input type="text" name="middlename">
</table></td></tr>
</td>
</tr>

On chnage of firstname value ,i am displaying div content,it overlapping other two input controls. Regards, Raj


Your code seems to be using z-inedx.


You spelt z-index incorrectly: you have written inedx.


Can you post some code? Also make sure that all of the elements you are trying to utilize z-index on are positioned (they are using the position attribute {relative, absolute}), z-index only works on positioned elements.


I answered a similar questions at bgiframe with jQuery UI 1.8.9 Dialog and jQuery 1.5. You need to set the parent element to position:relative, and also give it a z-index similar to the suggest box which is a child element. This will do the trick for IE.


Yes. When i had this issue, Position:relative; worked for me. you need to set that also.


Z-index is only compatible with sibling elements. Is that your issue?

0

精彩评论

暂无评论...
验证码 换一张
取 消