Hi
I want to change the color of a link when a user focuses on it by navigation to it using the TAB key. that’s the easy part, as it’s done by this:
a:focus{ color: red; }
the problem is, the link is also colored red when activated, e.g: when a user clicks the “ENTER” key or the left mouse click.
How can I prevent this side effect and keep the coloring only when user focuses on the link using the “TAB” key ?
I tried this:
a:focus{ color: red; }
a:active{ color: blue; }
(blue is the default color) it didn’t work, what happens is it first turned the link blue but then red in a slit second…
I need this done of every link on my site so I don’t want to use any complicated javascript code to do this and hoping to do this in CSS only.
any suggestions ?