As for the ordering of statements within a style (that was my original question but the diversions have been helpful), what about using a foreground to background method? I'm looking for a kind of conceptual hierarchy that is easily remembered. For example
font color width height padding margin position border background
Sean
On 5/09/2004, at 12:34 AM, Cameron Adams wrote:
If you think about it, ordering IDs in the order that they appear in the HTML goes against the grain of XHTML/CSS separation of content and style.
If you change the position of an object in the HTML, then you have to change it in the CSS, otherwise your order becomes meaningless. The best way is to have an order independent of the HTML content, such as alphabetical.
-- Cameron Adams
W: www.themaninblue.com
--- Brian Duchek <[EMAIL PROTECTED]> wrote:
******************************************************I'm 100% with Andy on this one. My coding style (pun intended) usually falls into the source ordered approach (i.e. the ID selectors will be found in the CSS in the same order that they appear in the HTML document).
I'll do grouping of "helper" classes as well, as I use them as sort of utilities.
Within each class or selector statement, I'll let my editor (DW or Topstyle) place them for me. At most it ends up being 10 short lines of text, and easy enough to scan quickly and identify what's what.
I do tend to put any hacks or "unusual approaches" at the bottom of the definition.
Cheers! Brian Duchek www.inquiline.com
On Fri, 3 Sep 2004 10:33:23 +0100, Andy Budd <[EMAIL PROTECTED]> wrote:listing styles in CSS? ISean wrote:
Does anyone know if there is a common way ofthe order ofdon't mean the order of a:hover a: visited, orlogical order that would bespecification. I am thinking more of somehave created.helpful to anyone else working on stylesheets Ihow to structure sets
Are you meaning in a micro or macro sense. i.e.of statement within a stylesheet or how tostructure a set ofmain ways. One is todeclarations within a statement?
If it's the former there tend to be a couple ofgroup statements into logical types, such as alllayout goes in oneplace, all text stuff in another. However Ipersonally break this infointo separate stylesheets as I find it easier tomanage.based on selector type,
Another popular way is to structure stylesheetsso you may have all element selectors first, thenall id's and lastlyall classes. I can see the logic behind this butit's not something Iposition in the flow of thefavour.
The way I tend to arrange statements is bydocument. So I'll have all universal statements atthe top, thenstatements relating to the header, nav, contentand finally footerstatements at the bottom. This works well for me,but I do often findthat I'll need to add a new statement later that'sthe same of similarto one I already have. Rather than taking theoriginal statement outand putting it up top with the universalstatements, I tend just totack a new selector on. This means that sometimesstatements aren'talways exactly matching the flow of the document.This is fine ifyou've only got one person working on the CSS, butwould get confusingbecause statementsif you've got multiple people using the same file.
As for arranging declarations within a statement,don't tend to be so long, I generally don't have aformat. I simply putthem in the order I write them in.
Andy Budd
http://www.message.uk.com/
******************************************************The discussion list forhttp://webstandardsgroup.org/http://we04.com/
Proud presenters of Web Essentials 04Web standards, accessibility, inspiration,knowledgeTo be held in Sydney, September 30 and October 1,2004http://webstandardsgroup.org/mail/guidelines.cfm
Seefor some hints on posting to the list & gettinghelp
******************************************************
-- Brian Duchek =-=-=-=-=-=-=-= e: [EMAIL PROTECTED] c: 847.809.2140 w: www.inquiline.com =-=-=-=-=-=-=-=
******************************************************The discussion list for http://webstandardsgroup.org/
Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail ****************************************************** The discussion list for http://webstandardsgroup.org/
Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
****************************************************** The discussion list for http://webstandardsgroup.org/
Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************