Jump to content

multiple style sheets: bad idea?


wolfkin

Recommended Posts

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?

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...