On Wed, 12 Sep 2007 11:17:59 +0100, Francois Jordaan wrote:
> How do you name classes and IDs, and why?
>
> I used to stick to all lowercase, but am starting to use CamelCase for ease 
> of reading
> (e.g. #HeaderMain rather than #header-main). This means I also capitalise 
> short names,
> e.g. #Content or .Clearer.
>

No difference. My advice FWIW: choose a method and stick to it.

I use lower-case with hyphens, simply to match property names -
not a good reason at all.

As for naming, I look at a lot of web sites and use popular naming
conventions when they mean something to me (#wrapper; #content; etc.)

As for IDs vs. classes, I name major structural elements using IDs,
and (few) classes for styled elements (.warning; .intro; .padding; ...)
The main reason for the IDs is for JavaScript rather than for CSS.

Cordially,
David
--

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

Reply via email to