According to a book I am reading (Web Standards Solutions by Dan
Cederholm), "Less code means faster downloads... Less code also means
less server space and bandwidth consumption..." Therefore you should
avoid getting "class happy" and overusing classes when it is possible to
contain elements within a div. 

HTH,
Kim Finleyson
Technical Communications/Web Content
Professional Computer Software Services, Inc.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark
Fredrickson
Sent: Tuesday, November 29, 2005 11:55 AM
To: CSS List
Subject: [css-d] Classes vs. ids

Here's a general question about CSS that I've been able to quite figure
out.
If one has a DIV that will only appear once per page, which should one
use:
a class or an id? 

Classes are obviously useful at applying to multiple elements, or
applying multiple classes to one element. What advantages have that
classes do not?
Specificity comes to mind, but the CSS rules regarding this are hazy in
my mind and I do not know if ids provide more specificity than classes.

Thanks for enlightening me,

Mark Fredrickson
E-Advocacy Manager
Planned Parenthood Minnesota, North Dakota, South Dakota 1200 Lagoon
Ave.
Minneapolis, MN 55408
Ph: 612.821.6154
Fax: 612.825.3522
Email: [EMAIL PROTECTED]

Are you a member of the Action Network?
http://www.ppaction.org/ppmsd/join.tcl
 

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org
-- http://www.evolt.org/help_support_evolt/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to