[thelist] [css-d] blue border around image links.

Christian Heilmann codepo8 at gmail.com
Fri Jul 6 11:08:50 CDT 2007

On 7/6/07, j s <jslist at sbcglobal.net> wrote:
> >From my notes - I have this javascript answer.
> onfocus="this.blur()"
> Hope it helps.
> Jess

No it doesn't, as that is a totally different problem. This removes
the dotted borders on some browsers and the blue border on MSIE 5/Mac
when you tab to or activate a link that doesn't go to another page.
Furthermore it is a bad idea as visitors with learning disabilities or
keyboard users are very happy to get to know where in the page they

The other solutions of border:0 are also not correct as that tries to
render a border with a width of 0 - which might work or not.

The culprit is that images _inside_ links get borders to tell users
that they are linked. Therefore the solution is to only delete the
borders inside links by setting border to none and not to 0. This will
reliably not show borders:

a img {border:none;}

also: http://wait-till-i.com/index.php?p=204

Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/

More information about the thelist mailing list