Making links the same colors

To make email links and website links on a site to always be the same color, (when they’re not hovered on), wouldn’t the syntax below work please ?

a:link, a:visited, a:active {
a:hover {

Any help appreciated.


Just be sure you could make the first line

a, a:link, a:visited, a:active

(add the a tag)

That’s brilliant, problem solved.

Many thanks. :slight_smile:

You forgot :focus be kind to keyboard users!

Logic, when you just use standard “a” for CSS it includes all the pseudo classes in it AFAIK:).

I suppose I should have been a little more clear. But I meant using :focus as the OP has done for :hover. :focus is for keyboards :hover is for mice. Ya?

Yes but theoretically, if people are using hte keyboard to navigate then they probably don’t have a mouse/can use one (most people use mouses)

So logically it would be the same experience as a “hover” :). So thus you don’t really have to differentiate hover/focus (theoretically of course ;))

No you don’t have to differentiate between hover…but there is no :focus at all and it will appear just like the others (except :hover).

I keep forgetting how and when, but sometimes when you define only the standard “a” (and so not the psuedo classes) one of the IE (I think it was 6) versions doesn’t apply it correctly to all links, you really have to supply all pseudo classes.

IE6 has that issue sometimes, although that is quite a rare occurance and it should be dealt with on the spot :). It’s always good to differentiate the pseudo classes though.

Off Topic:

Don’t let Tommy see that he’d freak-out; he is Mr “keyboard navigation-shortcut” guy. :wink:

Well, it depends upon platform too as to whether a person can navigate with a mouse input-device or decides to do so. Obviously it will then effect things like if :hover will be available - like was mentioned above.

lol-I’m in no way saying this should be done, it was all just theoretical ;). It made sense in my head. I awlays differentiate pseudo classes for links

Many thanks for the input, so how is it left - focus or no focus ? ?

Add the :focus on :slight_smile: