Previous Message
Next Message

how to specify mutiple selectors for a:link etc

Sent by Ingo Chao on 14 March 2006 19:07

Don - wrote:
> I want it to be this:
> .header1 a:link
> .header2 a:link
> Do I need to repeat the a:link part?
> .header1 a:link, .header2 a:link {color: #881719; text-decoration: none;}

It is mentioned in
5.2 Selector syntax / 5.2.1 Grouping

"A selector is a chain of one or more simple selectors separated by 
The whitespace between these two selectors is a "Combinator", which 
combines the two selectors into one:

..header1 a:link

"When several selectors share the same declarations, they may be grouped 
into a comma-separated list."

..header1 a:link, .header2 a:link { property: value; }

The comma separates two combined selectors.


css-discuss [EMAIL-REMOVED]]
IE7b2 testing hub --
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread:

Possibly related: