View Full Version : Is it better to put everything in 1 stylesheet, or spilt them

03-16-2005, 05:07 PM
So is it better to have one bloated stylesheet with the CSS of the entire site, or have one stylesheet with the template CSS and have other page specific stylesheet that only have CSS for elements that only occur on that page (like I have on my site (http://jero.net) and like on Mozilla's website (http://mozilla.org)?

03-16-2005, 05:36 PM
IMO, it kinda depends on how much CSS you have. It seems like you have quite a bit so it would be a good idea to have a couple. Also, wouldn't the load time be faster with more than one style sheet? Just my 2 cents.

Note: I am not near to being an expert, (I'm more like a beginner/intermediate), so my advice might be bogus :D

03-16-2005, 10:40 PM
Yeah, that's also how I think about it, but I just wanted some people to confirm this.

03-16-2005, 11:00 PM
Using the one would probably make less of an impact, seeing as it would be loaded the once and cached when used in other pages in a site.

The only reason I would use more than one stylesheet is if I had certain features that were unique to a template.

Global styles would originate from a master sheet. Style-specific from a sheet within the template folder.

03-16-2005, 11:49 PM
i only use one stylesheet, it's just much easier for me to edit things and it looks cleaner (at least for me it does)

Grant Palin
03-17-2005, 12:37 AM
On the other hand, you could seperate your stylesheet into two files: one for structure, and one for presentation.

Then use the structure file to control the layout and structure of your page and it's elements. In the appearance file, add rules to control the appearance of the page: colour, background colour, fonts, background images, borders, and so on. Without affecting the layout of the page.

Doing it this way, you'll wind up duplicating a lot of selectors, but you'll be able to more easily fins what you're looking for. It's also easier to set up alternate style sheets, one for a different colour scheme. So if you have differnet colour schemes with different fonts and images and such, put each one into a stylesheet file, link each file to your page, then you can allow site visitors to choose a scheme they like.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum