1

http://jsfiddle.net/B4van/

I have set up this basic fiddle.

As I have said in the title - the outline dotted border that is almost always added to links whenever they are clicked is not visible in IE7/8 when browsing with IETester, but the border is displayed in IE9 compatibility mode.

Since the other developer is working with IE9 only, he is testing the page with Compatibility Mode and is repeatedly informing me about the dotted border that has to be removed. He's asking me to add onfocus="if(this.blur)this.blur();" for every link on the page.

I have noticed in the other developers previous works, that he is seriously using this onfocus snippet. Although, that's the first time for me when I'm seeing those to prevent outline border.

Well, that seems more than wrong and odd to me, especially when there are plenty of links, so I am now asking here. Is it just IE9 Compatibility Mode bug, or I seriously have to append the onfocus snippet?

I have always, and now set it up with CSS:

a, a:focus
{
    outline: none;
}

But it seems to be not working.

Maybe someone with native IE7/8 (well, maybe on virtual os, but more native than IE Tester) could test it and report the result?

tomsseisums
  • 13,168
  • 19
  • 83
  • 145
  • Please don't use `onfocus="if(this.blur)this.blur();"`. For any desktop user that can't use a mouse, your web site will be unusable. At least `outline:none` can be overridden by a user style sheet. If you have to add it, at least wait until you've detected a mouse or touch event. – Alohci Oct 04 '12 at 11:25
  • I wont even try to. I am just looking forward to confirm whether the `outline: none;` works on native IE7/IE8. – tomsseisums Oct 04 '12 at 12:57
  • Finally got around to testing it in a native IE7, and `outline: none` has no effect, so the outline box *is* shown. – Alohci Oct 04 '12 at 17:01
  • IE7 does not work like IE8 which does not work like IE9 and none of them work like any of the other far more modern browsers. – Rob Oct 06 '12 at 11:47

2 Answers2

0

you can try this

a:active {outline:expression(this.onFocus=this.blur());}

internet explorer link outline | css5

css5
  • 1
  • 1
0

According to http://www.w3schools.com/cssref/pr_outline.asp

Outline is supported in IE8 only if a !DOCTYPE is specified. So yes, it clearly states, that IE7 is not even close to support it.

tomsseisums
  • 13,168
  • 19
  • 83
  • 145