Re: Changing Link Attributes On Mouse Movement

On Mon, 19 Jul 1999 16:11:31 +0200 (MET DST), Nicolas Lesbats
( wrote:
> Isn't it better to use a:link:hover and a:visited:hover ? (I believe it's
> valid)

It's probably best to use ":link:hover" and ":visited:hover", because:

* using the a element in the selector excludes XML links (if anything
  ever comes of XLink...)

* not using :link and :visited in the selector allows the selector to
  match named anchors (or everything if the a element isn't used),
  which could cause problems in browsers that support :hover on
  elements other than links

* using the order ":link:hover" rather than ":hover:link" avoids
  problems with browsers that incorrectly use only the last
  pseudo-class and discard the rest

I haven't thought the ":active" issues out as carefully, and they are
in fact more complicated because ":active" is part of CSS1.  Probably
the best solution is to have two separate rules (probably after any
rules for :hover):

a:active { declarations... } /* might match named anchors */
:link:active, :visited:active { same declarations... }

but I haven't tested this at all.


Received on Monday, 19 July 1999 10:58:47 UTC