W3C home > Mailing lists > Public > www-html@w3.org > November 2000

Re: Focus Borders Around Hyperlinked Images

From: Tantek Celik <tantek@cs.stanford.edu>
Date: Thu, 09 Nov 2000 21:51:38 -0800
To: Frag Limited <frag@frag.gg>, "www-html@w3.org" <www-html@w3.org>
Message-ID: <1238287097-956359516@psdbay.com>
I wrote:

> From: "Frag Limited" <frag@frag.gg>
> Date: Thu, Nov 9, 2000, 9:25 AM
>> I have some images that are hyperlinked. When these
>> images are clicked on, a dotted line or focus border
>> appears around it. Is there a way to disable this
>> inherent feature or cheat around it?
> Put one of these in your <HEAD>
> <STYLE type="text/css">
> IMG:focus { outline:none; }
> </STYLE>

Unfortunately, this only works if the IMG's themselves are also the
hyperlinks (which may be possible with XHTML+XLINK but I am not sure).

Presumably your "images that are hyperlinked" look more like this:

<a href="http://www.w3.org/">
  <img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home"

And the focus border is actually on the <A> rather than the <IMG>, so you
need this style sheet:

<STYLE type="text/css">
A:focus { outline:none; }


Because I believe in something.             http://www.microsoft.com/mac/ie/
Received on Friday, 10 November 2000 00:50:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:55 UTC