Flaxbeard
Flaxbeard

Reputation: 501

CSS: Active act as hover?

When using tab to navigate my site, is there a way to make an active link act as if the mouse is hovering over it? I have several sub-stylesheets for different colors and a master one for things such as spacing, is there a way that I can make an active element act as css hover without duplicating my hover code?

Upvotes: 2

Views: 658

Answers (1)

drip
drip

Reputation: 12943

Why dont you add it like so:

a:hover, 
a.active { color:#000; }

And you won't be repeating the same line.

Upvotes: 2

Related Questions