[thelist] CSS Strangeness

sfmalo sfmalo at msn.com
Tue Jul 17 03:59:58 CDT 2001


Think we went through this very question in March. I saved a message re it
'cause I was wondering the same thing at the time. It says that a:hover
should be placed third not fourth in order. Here 'tis:

At 01:17 AM 28/3/01, jami mccabe found time to write:
>  Soon as I put it into a web, I get some underlined links, not all, and
> some a color that isn't specified anywhere. Has anyone had this problem
> -am I doing something really DUMB?? Help Please! I was supposed to have
> this site up this week... Thanks!

>The order that you put them in is important. From the W3C:

>"Note that the A:hover must be placed after the A:link and A:visited rules,
>since otherwise the cascading rules will hide the 'color' property of the
>A:hover rule. Similarly, because A:active is placed after A:hover, the
>active color (lime) will apply when the user both activates and hovers over
t>he A element."
(http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-classes)

>So try putting them in this order:

>a:link
>a:visited
>a:hover
>a:active

>Also note that hover won't work in NS4.

>Brian
comharsa at clara.net

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----- Original Message -----
From: ".jeff" <jeff at members.evolt.org>
To: <thelist at lists.evolt.org>
Sent: Monday, July 16, 2001 3:49 PM
Subject: RE: [thelist] CSS Strangeness


> rachell,
>
> :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> : From: Rachell Coe
> :
> : I finally decided to use some CSS on a clients web page,
> : only the CSS selectors aren't working.  The green links
> : are supposed to turn red when the mouse hovers over it,
> : only its been really hit and miss on which ones will work.
> :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> it's only the visited links that aren't doing the hover color.  try moving
> the a:hover to the last of the four declarations for the anchor.
>
> a:link {
>  ...
> }
>
> a:active {
>  ...
> }
>
> a:visited {
>  ...
> }
>
> a:hover {
>  ...
> }
>
> good luck,
>
> .jeff
---------------------------------------------------------------------------
Sharon F. Malone
"web design and Internet writing services"
http://www.24caratdesign.com






More information about the thelist mailing list