On Oct 18, 2006, at 8:32 AM, frances wrote:

> Does anyone know of experienced css users creating or suggesting  
> naming
> standards for classes and IDs?

I *never* put style information in the ID/class name. that means when  
the time comes to rework the site, I can rework the style without  
having to change the name of the ID/class. Likewise, I've learned not  
to put other presentation details in them (I no longer use things  
like #topnav or #leftcolumn).

Instead I've taken to using strictly structural/semantic names  
(#maincontent, #mainnav, #modulenav for page layout structural  
features and .booktitle, .bookauthor, .menuitem, and the like for  
semantic identifiers).

I've taken to looking at a document in terms of XML: if I were free  
to use any tag at all to describe this chunk, what would it be? if  
the tag exists in (X)HTML I use it, if not I use either span or div  
with an id or a class that uses that tag as a name. It makes  
maintenance a lot easier, as most of the time all I have to do is pay  
around with one file to achieve any design change I'm after.

Have Fun,
Arlen

------------------------------
In God we trust, all others must supply data

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to