I’m trying to turn a div into a link. The code below works fine in firefox but in IE the mouse pointer doesn’t react to the link. Is there a way around this? Thanks.
<html>
<head>
<style type="text/css">
.test{
width:100%;
height:100px;
background:#666666;
}
</style>
</head>
<body>
<a href="http://www.google.com">
<div class="test">
kjlkjlkjkljl
</div>
</a>
</body>
</html>
I think IE’s actually responding properly in this case.
A
divis a block-level element; so it shouldn’t be contained within an inline-element such as, for example, ana. If you use aspan(in place ofdiv) does that work in both IE and Firefox?If you want to make it look like a link (in terms of the cursor), then you may want to use: