| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Refrigerated User
Join Date: Mar 2006
Location: Central US
Posts: 161
|
I like all my CSS in one file, are there any potential prblems with this? I've seen sites with multiple CSS files, one for layout, one for content, one for special includes, etc. On a current ASP site, we resolved a CSS issue by simply consolidating all CSS files into one. You of course have be careful to maintain the cascading order when you do. What do you think: One CSS file -OR- split it up? |
|
|
|
|
|
#3 (permalink) |
|
Moderator
Join Date: Jan 2005
Location: Brooklyn, NYC
Posts: 11,869
|
In development, we split up our files and maintain anywhere from 5-20 separate CSS files (helps avoid conflicts in SVN). When we're done, they all get concatenated and compressed into one to three files. Same with JavaScript to a degree. Fewer files = fewer server requests = faster site. Find good advice in the beginners web design thread.
patrick o'neill web developer | blog | spam humor |
|
|
|
#4 (permalink) |
|
unusual suspect ™
Join Date: Jul 2004
Location: DE, USA
Posts: 2,511
|
We (I) split ours into relevant sections so as to not call files that aren't needed e.g. we have a main.css which covers content presentation and is common to all pages, a secondary.css to handle navigation which is unique to the section of the site that you are on (4 main sections). A another.css is used for some pages that require styling that isn't relevant anywhere else. We also have a large number of people that license our content and have a main.css file for them as well as an extra.css that sits at the end of the list to override some of our content styles as applicable to better match their own content (alternative fonts, link stylings and the like). (Above namings are not actual) |
|
![]() |