a:hover + a:visited (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


stall -> a:hover + a:visited (3/11/2007 20:51:47)

Hi. I'm just wondering if anyone knows how to make it so that all links, when hovered, will do the code in the a:hover block.

Seems like I'm asking a retarded question at first glance, but, lets take a look at what is actually retarded. . .

a:hover {
color: blue;
}

when i click a few links and come back to the page, i'll see purple underlined links replacing the links i just clicked.

if i add

a:visted {
color: original_color;
}

Then only some of the links (the ones i haven't visited) will hover correctly.


Does someone know a way to get around this and still be able to hover all the links???

Thanks.




rubyaim -> RE: a:hover + a:visited (3/11/2007 21:21:38)

Hi, the a:hover needs to come after the a:link and a:visited, eg:

a:link {
color: red;
text-decoration: none;
}

a:visited {
color: black;
text-decoration: none;
}

a:hover {
color:blue;
text-decoration:underline;
}

This might be useful CSS Pseudo-classes

This is quite good as well - FAQ - Link (<a>) States - especially the bit about remembering the order [:)]





jaybee -> RE: a:hover + a:visited (3/12/2007 4:22:55)

quote:

Or you could use: LoVe HAte to help remember the order.
There's one big problem with that. There's no F in it for Focus. Perhaps it should be LoVF HAte.




Tailslide -> RE: a:hover + a:visited (3/12/2007 5:03:40)

It's -

L ord
V ader
F ormer
H andle
A nnakin




jaybee -> RE: a:hover + a:visited (3/12/2007 6:08:18)

Depends on your situation. Three doors down it would be

Latest Visit From Housing Association. [:D]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125