[thelist] Oddness with link names...
Joe Crawford
jcrawford at avencom.com
Fri Aug 17 19:06:37 CDT 2001
JTocher wrote:
> Hoping someone can shed some light on a puzzling issue...
>
> Why, oh why, does a 'hover' *not* work on the following urls
>
> <a href="http://webserver.ortn.edu">ORS home</a> •
> <a href="http://jms.ortn.edu">Jefferson Middle</a> •
>
> but it *does* on the following:
>
> <a href="http://rms.ortn.edu">Robertsville Middle</a> •
> <a href="http://orhs.ortn.edu">Oak Ridge High</a>
>
> Using *very* basic styles as follows:
>
> a:link { color: #d9d9d9; text-decoration: none }
> a:hover { color: #d9d9d9; text-decoration: underline }
> a:visited { color: #d9d9d9; text-decoration: none }
>
> Will sincerely appreciate any insight!
Because you /visited/ the first two, but had not visited the second two
(yet).
Remember that "C" in "CSS" - the cascade. In the CSS snippet you
provide, styles will be applied where applicable. When you visit a site,
you activate the "visited" pseudoclass - and overwrite the "hover"
pseudoclass.
To get around this, you should put the hover /last/. That way you always
get the hover.
You do realize, of course, that you're making /all/ the links look alike
that way. Always consider the value of showing people what links they
have visited and weight it against other design goals.
I use a slight perversion of the bug you came across here:
http://www.artlung.com/blog/
In this way I get "two" hovers - one for visited links, and for
unvisited links. By purposefully ordering them the way I do I get a
simple underline hover for visited, and a reversed out effect for new
links. For some instances, this would be distracting, but for this use,
it works.
HTH,
Joe <http://artlung.com/>
--
................... Joe Crawford \\ Web Design & Development
..... mailto:jcrawford at avencom.com \\ http://www.avencom.com
.... San Diego \\ CA \\ USA \\ AVENCOM: Set Your Sites Higher
More information about the thelist
mailing list