straightryder Posted January 4, 2010 Report Share Posted January 4, 2010 have per site? Is there a limit that you set? Quote Link to comment Share on other sites More sharing options...
virtual Posted January 4, 2010 Report Share Posted January 4, 2010 Usually only one if the site is not too complicated, with perhaps a separate stylesheet for Internet Explorer. If the site is complicated, then the above and perhaps another stylesheet for a gallery page or a multi level drop down menu. But then I don't do huge sites, so let's hear what others have to say. Quote Link to comment Share on other sites More sharing options...
Wickham Posted January 4, 2010 Report Share Posted January 4, 2010 As many as you like, but it can get confusing. Have a strategy, like a css file stylesheet for general page layout, div sizes, margins, floats, etc. a stylesheet for presentation, text colors, background colors, etc. a stylesheet file for a drop down menu as styles in there probably won't conflict with any styles elsewhere a stylesheet file for IE6 different styles to go in a conditional comment Quote Link to comment Share on other sites More sharing options...
newseed Posted January 4, 2010 Report Share Posted January 4, 2010 (edited) You can have as many stylesheets as you desire. For some it can be a bit busy and cluttered to have all your styles within one stylesheet. Here's my preferred example. One for global stylings; one for structural layout; and one for menu(s). global.css layout.css menu.css I don't always do this because it depends on the complexity of the design. It doesn't really matter how many stylesheets you have. What matters is how you navigate around the css to find the code you are looking for. If you find that locating certain styles within a 1000 lines of css code is a bit difficult then it would be ideal to split them up into a more managable group of stylesheets. I had one old client that bought a template which had just two styelsheets one of which had over 3000 lines of css codes. It was brutal. The other stylesheet was for a IE conditional comment. A mere 3 lines of code. Edited January 4, 2010 by newseed Quote Link to comment Share on other sites More sharing options...
straightryder Posted January 5, 2010 Author Report Share Posted January 5, 2010 "A mere 3 lines of code." your kidding, right? Quote Link to comment Share on other sites More sharing options...
newseed Posted January 5, 2010 Report Share Posted January 5, 2010 "A mere 3 lines of code." your kidding, right? Not at all. That particular short stylesheet was for IE6 conditional comment but I have since removed that and was able to apply it correctly in the main css stylesheet. Oh, I had the daunting task to optimise that 3000 lines of css. It took almost a whole day but I was able to get it down to about 800 lines or so. Some people find this to be way too many still but when I say that there about 800 lines, my lines are like this: #container{ width:970px; padding:5px; position: relative; } ...which counts as 5 lines. Some people do it this way: #container{width:970px; padding:5px; position: relative;} ...which count as one line. However, this method is a bit more difficult to read through when editing which is why I use other format. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.