Previous Message
Next Message

Re: [css-d] difference between class and id selectors

Sent by Rijk van Geijtenbeek on 31 January 2002 04:04

On Thursday, January 31, 2002, Ian wrote:

>> To put it another way, are there circumstances in which one would always
>> use an ID selector and not a CLASS selector (or vice versa)?

You could always use classes instead of ID, if you want to. ID is
only really needed when you want to reference an element in a script.

> ID is a unique selector. . .you can only use a particular value for and ID
> once on a page.

The current browsers don't actually mind if you reuse an ID value on a
page for styling multiple elements, but it is unwise to rely on that

 Rijk                            [EMAIL-REMOVED]

Mot du Jour:
Eschew obfuscation.
Previous Message
Next Message

Message thread: