W3C home > Mailing lists > Public > www-style@w3.org > December 2004

Re: assigning multiple classes to achieve multiple backgrounds ?

From: Brian Sexton <discussion-w3c@ididnotoptin.com>
Date: Tue, 7 Dec 2004 02:51:46 -0800
Message-ID: <002501c4dc4a$bf332ff0$651aa143@desktop>
To: "Sander van Dragt (by way of Bert Bos <bert@w3.org>)" <svandragt@s82.nl>
Cc: <www-style@w3.org>

Sander,

In addition to the overwriting issue about which you already know, you 
should also be aware that the example style definitions you submitted were 
for specific elements, not classes of elements.

Use this:

.ClassSelector { . . . }

for this:

<div class="ClassSelector">I am of a particular type of thing, but not 
necessarily unique.</div>
<div class="ClassSelector">Me too.</div>
<div class="ClassSelector">Me three.</div>

Use this:

#SpecificElementSelector { . . . }

for this:

<div id="SpecificElementSelector">I am the only one of my kind.</div>


Kind regards,

Brian Sexton 
Received on Tuesday, 7 December 2004 10:51:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:35 GMT