1

I have an image map:

<map>
  <area ..>
  <area ..>
</map>

There was an outline showing up in IE so I modified the code to read:

<area onfocus="blur();"

This removed the outline from IE, but now I have an outline when I click on the area in Firefox (version 9.0.1)...

I also tried:

map > area,
map > area:active,
map > area:focus {outline: none; border:0; }

Any advice would be greatly appreciated.

Community
  • 1
  • 1
redconservatory
  • 21,438
  • 40
  • 120
  • 189

4 Answers4

1

Problem solved:

onclick="blur()" onfocus="navigator.appName == 'Microsoft Internet Explorer' ? blur() : null"
Josh Darnell
  • 11,304
  • 9
  • 38
  • 66
1

Such a bizarre issue. I tried Sally Oldfield's solution, but found that Chrome suffers from the same issue as IE - it needs the blur() call.

So this is the solution I came to that works in Firefox, Chrome and IE:

<area onfocus="navigator.userAgent.indexOf('Firefox') != -1 ? null : blur()" ... />
DavGarcia
  • 18,540
  • 14
  • 58
  • 96
1

Try to add this to your CSS:

area:active, area:focus {
    outline: none;
}
sdrm
  • 194
  • 1
  • 8
0
<area tabindex="-1" [...] />

I had thought I fixed this using a jQuery version of the blur() solution, which worked for Safari, but then FF had a dotted outline. adding a tabindex="-1" to each solved for both!

fastasleep
  • 306
  • 2
  • 6