wolfkin Posted June 7, 2009 Report Posted June 7, 2009 right now I only have three style sheets default, accordion effect and slimbox. I'm wondering if there's any major reasons why I should avoid multiple sheets like I avoid classes > ids. it seems to me that multiple sheets have the benefit of being easier to organize but is there something I'm missing?
Andrea Posted June 7, 2009 Report Posted June 7, 2009 Nothing wrong with using multiple stylesheets. But what do you mean you 'avoid classes > ids'?
wolfkin Posted June 8, 2009 Author Report Posted June 8, 2009 thanks. You know next month I really should get a reference book. is there a thread with book recommendations? Nothing wrong with using multiple stylesheets. But what do you mean you 'avoid classes > ids'? i was referring to the sticky topic Classes: Beginners always write classes, then you will see a dozen paragraphs with identical class names. Again this is due to this HTML style of writing we learned first and how we had to write fonts into everything. CSS is not that way.
PicnicTutorials Posted June 8, 2009 Report Posted June 8, 2009 Hi, in short, you should organize it the way that it is the easiest for you to maintain. Most only use one, but there are also quite a lot that use multiple.
LSW Posted June 8, 2009 Report Posted June 8, 2009 A matter of choice really, as said what is better for you OR whoever will maintain it. My issue with multiple style sheets is interfierence. It is easy to create elements that interfier with others on a different sheet. As you write it it sounds like you have pre-made style sheets for scripts you are using, so that is fine. I always use one. However while working on a high level web application for the state, we used many. As I recall it, we had one for basic HTML tags, then we had one for specific items like forms, and ones for specific pieces of the application, one for ASP wizzards and one for the login section... This was the decision of the lead programmer. I hated it at first but although I was technically in charge of the look and feel as the only real web guy... each of 4 programmers made their own pages for their part. In the end multiple external just worked better. So I would say the scope of the project is to be considered. Small projects I do not bother. But massive ones are likley easier with multiple. of course I would have a mobile style sheet separate from the general one.
jlhaslip Posted June 8, 2009 Report Posted June 8, 2009 What I sometimes do is create a 'default' style sheet for the site structure - the main blocks on the page. Then another one to 'style' those blocks. Add images, colours, etc. to another CSS file. That lets me use and reuse the 'structure' andall of the 'style' information is adapted for the second site due to the separation of the CSS for the structure and the styling.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now