Is there anyway to remove the outline when you select an area on an image map? See:
So if you have an archaic webpage without css (I know awful!) you can fix it by inserting style="outline:none" after the coords and before the href within the area tag- absolute perfection!
I was having this same issue with both chrome and safari and found success by assigning a class .map to each area tag and giving the class the following style:
.map {
outline: 0;
}
Tried outline:0
on its css rule ?
It seems like all you got to do to remove these borders lies on the img
tag, by setting the hidefocus
attribute and the outline
css property on it like this:
HTML
<img class="map" src="..." usemap="..." hidefocus="true" />
CSS
img.map, map area{
outline: none;
}
This should work cross-browser!
EDIT
Like Sergey K commented, if you're not looking to support IE6 you can save bytes by just using an attribute selector.
img[usemap], map area{
outline: none;
}
Support starts with IE7.
Give your imagemap an id of "Map" then use the following CSS declaration:
#Map area {
outline: none;
}
Kinda old-fashioned, but does this work:
<area onfocus="blur();" ...
?
GTX, CS