Is there anyway to remove the outline when you select an area on an image map? See:
I'm using Chrome on Snow Leopard.
Is there anyway to remove the outline when you select an area on an image map? See:
I'm using Chrome on Snow Leopard.
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;
}
hidefocus="true"
part? Tried up to IE11, no luck so far.
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;
}
Kinda old-fashioned, but does this work:
<area onfocus="blur();" ...
?
GTX, CS
Give your imagemap an id of "Map" then use the following CSS declaration:
#Map area {
outline: none;
}
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!
Use CSS. Set style="outline:none;"
on the element, or preferably, put it in a style sheet.
area
elements of the image map but if you're saying that doesn't work, then I'm really not sure. Double check there aren't any spelling/syntax mistakes... we all make them.
Jun 16, 2011 at 14:33
Tried outline:0
on its css rule ?