View Full Version : CSS - setting all 'A' attributes in one go?

10-31-2004, 05:19 PM
In my CSS, I have something like this which sets all the links to one color by default:

A {
color: #BLAH1;
text-decoration: none
A:hover {
color: #BLAH2;
A:active {
color: #BLAH2;

The attributes for hover and active are exactly the same. To save space, is there a way of setting them all in one go? For example like this (which I know doesn't work but it gives an idea of what I'm on about..):

A:hover AND A:active {
color: #BLAH2;


Puffin the Erb
10-31-2004, 05:25 PM
Replacing AND with a comma should do it.

10-31-2004, 05:34 PM
Also, A should be a.

11-01-2004, 04:11 AM
You could also do:

a { blah: blah; }