xpblueScreenOfDeath
Programmer
- Sep 1, 2004
- 87
How come I can't click on the button that is above the link in IE(works perfectly in firefox) and how to solve it? I know it is a stupid example, but it is base on a real problem that is similiar in concept.
Since, the button has a higher z-index doesn't that mean it should be above the link; therefore only the button's action can be called. In IE, I could only get the link's action to be called, but in firefox I could only get the button's action called which is the complete opposite. How can I make it work in IE like mozilla.
Code:
<html>
<head>
</head>
<body>
<form>
<Div>
<Div style="overflow: hidden; width: 80px; float: left; opacity: 0; filter: alpha(opacity=0); z-index: 2">
<input type="button" name="myFile" style="position: relative;" onclick="alert('button click')" value=abcd />
</Div><DIV style="overflow: hidden; width: 80px; position: relative; Left: -80px; z-index: 1"><a href="javascript:alert('link click')">testing</a></DIV>
</Div>
</form>
</body>
</html>
Since, the button has a higher z-index doesn't that mean it should be above the link; therefore only the button's action can be called. In IE, I could only get the link's action to be called, but in firefox I could only get the button's action called which is the complete opposite. How can I make it work in IE like mozilla.