[BNM] ordering classes in css

James Bates james at exit7.co.uk
Tue Jul 11 12:43:01 BST 2006


Richard,

> is there any such thing as: an accepted standard?

I tend to organise my styles structurally, mirroring (to some extent) the
pages mark-up.

So if the page is...

<div id="header">Header content</div>
<div id="content">Content content</div>
<div id="footer">Footer content</div>

Then my styles are usually organised as such


/*Header styles*/
#header {};
.any-other-styles {};
.that-appear-in-header {};

/*Content styles*/
#content {};
.any-other-styles {};
.that-appear-in-content {};

/*Footer styles*/
#content {};
.any-other-styles {};
.that-appear-in-footer {};


I also split my stylesheets up into several manageable stylesheets...

structural.css  - Holds structural elements i.e. main positional DIV's
semantic.css    - Contains all semantic elements headings, paras, list etc
styles.css      - For any additional graphical styles


Hope that makes some sense

James





More information about the BNMList mailing list
BNMList is hosted by Screenlists, a Screen-Play.net service