Source code
Revision control
Copy as Markdown
Other Tools
<!doctype html>
<html>
<head>
<title>img ismap attribute coordinate origin</title>
<style>
#bg { background-color: lightgray; position: relative; }
#target { position: absolute; width: 96px; height: 96px; border: 2px dashed green; pointer-events: none; }
.before { top: 50px; left: 50px; }
img { margin: 50px; border: 50px solid white; padding: 50px; }
</style>
</head>
<body>
<div id="bg">
<div id="target" class="before"></div>
<a href="/somewhere/">
<img src="/images/blue96x96.png" ismap>
</a>
</div>
<h1>Click inside the dashed rectangle</h1>
</body>
</html>