Ian Piper wrote:

> My client also wants to have colour variations within the overall  
> them on some pages, meaning that I will have to vary background and  
> keyline colours.
> 
> The question is one of how best to organise my css files. I could  
> have all of the styles defined in one .css file and put the  
> variations in the head of each html file, or I could link to a style  
> sheet designed specifically for the page, and then import the more  
> general style sheet. From what I read it appears that linked styles  
> override imported styles. The latter seems a cleaner approach, but  
> most of the sites styles would end up in an imported style sheet, and  
> I understand that older browsers do not support importing.

I do this a lot on CMS-based sites and I've slowly settled into using 
one main style sheet with structural stuff and a default "theme", then 
linking individual style sheets for the various themes/colors in the 
head, like:

<link rel="stylesheet" type="text/css" href="/css/main.css">
<link rel="stylesheet" type="text/css" href="/css/section.css">

The rules in "section.css" will override those in "main.css".

Of course, these are dynamic (that is, data-base driven, not exciting) 
sites so I can automagically call the required stylesheets via some 
server-side code and don't have to maintain the links manually.  It's 
not unusual to have 20 style sheets in a project, some with just a few 
lines. I'm sure others will point out the downside to doing it this way 
but I think this helps me keep my wits around what's being applied where.

FWIW, YMMV, My $.02, etc.

-- 
Steve Clason
Web Design & Development
Boulder, Colorado, USA
www.topdogstrategy.com
(303)818-8590

______________________________________________________________________
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