...

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



Richard
10-31-2004, 04: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, 04:25 PM
Replacing AND with a comma should do it.

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

Kurashu
11-01-2004, 03:11 AM
You could also do:


a { blah: blah; }



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum