[thelist] IE - The claret (white dotted line) on clickable images

MRC webmaster at equilon-mrc.com
Mon Nov 26 11:17:54 CST 2001


Paul,

> does anyone know how to get rid of the white dotted line on images that
are
> clickable when you click on them in IE - i need some sort of code for it -
a
> customer doesn't like it - i tried to explain thats its just the way it
is -
> but i said id try and find some code.

    I know that this thread has been laundered pretty thoroughly, but since
I didn't notice anyone offering this particular answer, I thought I'd throw
it into the mix. There is a proprietary IE property, hidefocus, (IE 5.5+)
that removes the focus outline around objects without blurring the object:

<a href="blah.html" hidefocus="hidefocus">Blah</a>

    You can also use the compact form without a value. The advantage of this
approach over self.blur() is that the object still maintains focus; and by
using the CSS :active pseudo class, for instance, you can still indicate
focus by other means.
    There is also a standards-compliant approach that uses CSS 2, but I am
unaware of whether any browser currently implements it:

a:focus {
  outline: none ;
}
a:active {
  outline: none ;
}

    :focus is a pseudo class like :hover. outline is a CSS 2 property that
designates the box (typically a dotted line) created when an object has
focus.
    Since IE doesn't yet support the CSS 2 approach, it is something to be
aware of for the future. I would also echo the accessibility and usability
concerns over removing the dotted line. There may be cases where this is
truly useful, but I would argue that they are the rare exception.

James Aylard





More information about the thelist mailing list