In Tips Jun 4, 201011
Should Long CSS Code be Divded into Several Files?
There are some debates within web design that have always split the community down the middle, everyone has there opinion about them, and both sides in there own way are correct for differing reasons. You know the kind of fiery debates – Fireworks v Photoshop and WordPress, Joomla or Drupal, to name just a couple.
Another debate, perhaps not as fiery as the other two we have mentioned, was recently asked on Design Reviver Answers, that question was: “Should you separate into separate files long CSS code?“. There are two sides to this question and both were recently discussed. What is your opinion?
You can leave a comment below or you can leave your solution on the original posted question on Answers.
Will Placing Long CSS Code Into Separate Files Increase or Decrease Browser Performance?

This question was originally asked by Autobots, as we have already mentioned, and you will find the favorite (as voted by Answers users) solution below:
Answer from Michael Mior:
Answer from Rubacode:
Unanswered Answers
Can you help with this weeks unanswered questions?
- Is it Possible to Write My Own MySQL Functions That I Can Call When Making MySQL Queries?
- What are Some Pros and Cons of Using Inline Expansion (jQuery Accordion) on Your Website?
- Is there a Way to Detect if JavaScript Files Have Been Loaded?
- Are There Any Good Solutions for Analyzing a Users Text in PHP (Term Sensitive)?
- How Would I Globally Replace a String in MySQL?
- What’s the Best Way to Make a Set of AJAX Calls Sequential (Right After the Other In Order)?
- How Can I Get a JavaScript Event to Fire Specifically When the Background is Clicked?
Thanks again, firstly to everyone who asked a question, but most importantly thanks to everyone that took the time to offer always helpful and useful answers.




11 Comments
Jun 4, 2010
Jun 4, 2010
Jun 4, 2010
Jun 4, 2010
Jun 4, 2010
Jun 5, 2010
Jun 5, 2010
Jun 6, 2010
Jun 6, 2010
P.s. Check your there/their/they’re grammar!
Jun 7, 2010
Minify will also Cache the resources so that it doesn’t process the compression on each request.
Tools like Pagespeed (from Google) and Firebug (on Firefox) also recommend these methods as a way of speeding up a web page.
Thanks
Jun 14, 2010
But as a general rule of thumb you should work with separate files, but try to serve one full file. If you have the ability to compress/minify them all into one, then great.
However, if you don’t, you shouldn’t sacrifice ease of development to save a few server calls.
But with all of the above said, if you layout your CSS file properly and make it easy to navigate, you can usually get away with easy development in one file.
Leave a Comment