In Chrome and Firefox, the following code works fine and makes the container clickable. However, in Internet Explorer, only the inner div
changes the cursor to indicate that it's clickable, not the span
.
I could use cursor:pointer
to fix this issue, but the more important problem is that it doesn't allow for right-clicking to open a new tab.
Is there any solution to this problem? Thank you!
<html>
<head>
<style type="text/css">
span{display:inline-block;width:100px}
</style>
</head>
<body>
<a href="/">
<div>
<div>title</div>
<span>text</span><span>text</span>
</div>
</a>
</body>
</html>