Glemte lige den sidste, hvis nu at der er
flere elementer som ikke kan være i a elementet
Kan du lege med denne:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Ingen titel</title>
<style type="text/css">
#a {width:100px;height:100px;background:#aaa;position:relative;}
#a:hover {border:1px solid #000;}
#a a {width:100%;height:100%;display:block;position:absolute;z-index:2;top:0;left:0;}
</style>
</head><body>
<div id="a"><div style="position:absolute;z-index:1;"><div>a</div><div>b</div><div>c</div></div><a href="#"></a></div>
</body></html>
eller:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Ingen titel</title>
<style type="text/css">
#a {width:100px;height:100px;background:#aaa;cursor:pointer;}
#a:hover {border:1px solid #000;}
</style>
</head><body>
<div id="a" onclick="window.open('
http://www.eksperten.dk/spm/776941','_blank');"></div>
<a href="#" id="b"></a>
</body></html>