I am trying to use the <area>
and <map>
tags to make parts of images behave as links. But I don't know how to make the mapped area visible to control where it is exactly (except watching where the cursor becomes a pointer, but that's too tedious...)
So if I use the following example code, how can I make the polygon visible on top of the image (without focusing or hovering) in order to edit it more effectively?
I tried to add a class
attribute to both the map and the area which has a border defined in CSS, but that didn't work: If I add it to the <map>
tag, it's shown outside the image (next to the right bottom corner), if I add it to <area>
, nothing is displayed at all.
<img src="mypicture.gif" width="300" height="200" usemap="#mymap1">
<map name="mymap1">
<area shape="poly" coords="120,80,130,70,50,90,120,180,50" href="mylink.html" class="x">
</map>
CSS:
.x {
border: 1px solid red;
}
Additional remark after getting answers: I need it it to edit the link areas, those areas are not supposed to be visible all the time and also not only on hover. The Firefox addon mentioned in the accepted answer is perfect - it shows the areas all the time and even allows editing, adding additional polygon nodes etc.