For me, I like to keep absolutely everything in one file... that way it's all in one place for when I got to start changing out the look and feel.

I do two main things to organize to make it easy:

- Ordering in the document... breaking the file into blocks of like types. So global stuff is always at the top, page specific stuff is at the bottom. And the more places something is used, the higher in the doc it's placed. (And if something minor usage gets increased, I'll actually move it in the document)

- Commenting... sounds obvious, but easy to forget. I'll actually go in and add comments before and after each "block" of content, as well as commenting each CSS block. This makes it easy either ctrl-F while I'm working, or remember what the heck I was thinking 6 months later.

Oh, and I guess the third thing - use descriptive names. So often I see people using things like "lf-col" rather than "left-column" or "ftr" rather than "footer".

It's a few extra characters, but in 6 months or a year, you'll wish the creator had used a name that's logical...especially if it's not your code.

FWIW

Ryan Everhart wrote:

All,
I believe this is a very timely discussion since the meeting last
night had to do with CSS and I'm sure you all have hundred's of ideas
going through your head.  Here my issue:

I have designed an internal website for my company which my
organization of about 200 people use daily.  In this website there
about 5 to 6 web based applications.  For these applications I have a
style sheet set up defining font size, table styles, row styles,
button styles and other styles like forms.  These are styles that I
use through out apply my applications on this site.

After doing some research I came across a site that has some pretty
cool styles for <ul> and <li> tags [1].  So like any other CSS
information on my site I started putting these styles on my Style
sheet and it got me wondering.  How do you all organize all the
hundreds of lines of styles you could have for your web sites?  Do you
keep them all on one style sheet?  What if you are using a particular
style only on one page on your entire web site, do you do inline css
for that style?  Right now my style sheet is 350 lines long.  Is that
too big?  Should I have a style sheet for each application?  These are
the questions that come to mind.  How do you all organize your CSS?

Anyone else going to the Netxel Cup race this weekend?

Ryan

[1] http://css.maxdesign.com.au/listamatic/
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm










----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm





Reply via email to