Don't forget that in your CSS, you can combine the pseudo-selectors:
a:link {
color: blue;
}
a:hover {
color: green;
}
a:visited {
color: purple;
}
a:active {
/* link is active */
color: red;
}
a:visited:hover {
/* hovering on a visited link */
color: pink;
}
a:active:hover {
/* hovering on an active link */
color: black;
}
a:visited:active:hover {
color: fuchsia;
}
There's a definite difference between a:active
and a:active:hover
: a link can become active by tabbing to it using the keyboard. Though it's not 100% foolproof, the state of being active and hovered would suggest that the user has the link depressed. Altering the border style would give you the desired effect. The only bug in this is if the link becomes active and then the user hovers over it without clicking, it'll still go depressed.
Try this CSS to see what I mean:
a {
padding: 5px 10px;
background-color: gray;
border-color: gray;
border-style: outset;
}
a:active:hover {
border-style: inset;
}