Grow your CSS skills. Land your dream job.

How many style sheets to use

  • # January 5, 2010 at 4:36 am

    Hi.

    It seems that Google is prizing speed with it’s new caffeine update and has introduced some new features to its Webmaster Tools. These new features relate to the speed of your site and offer tips on how you can improve it (to find these log into webmaster tools and and it is under ‘Labs’ on the far left of the screen)

    Some advice it gives to improve the speed of my site is to use as few CSS files as possible. Now I can see this makes sense in most cases but I have a sneaking suspicion that I should use more than one.

    This is because I have three different kinds of pages on the site.

    Homepages (http://www.memoryfoammattresszleeps.co.uk)

    Product pages (http://www.memoryfoammattresszleeps.co. … tress.html)

    News Pages (http://www.memoryfoammattresszleeps.co. … ticle.html)

    So in terms of speed, is it better to have a general style sheet that applies to all pages and then a more specilised sheet per page? Or keep it ALL on one style sheet?

    Thanks for any help.

    # January 5, 2010 at 4:54 am

    Oh… this what Google has to say about it in their new Webmaster Tools section

    Combine external CSS
    There are 2 CSS files served from http://www.memoryfoammattresszleeps.co.uk. They should be combined into as few files as possible:

    * Go to URLhttp://www.memoryfoammattresszleeps. … eorder.css
    * Go to URLhttp://www.memoryfoammattresszleeps. … screen.css

    # January 5, 2010 at 5:00 am

    Also, to get suggestions on how to improve your pages I think you have to install Google Pagespeed tool.

    http://code.google.com/speed/page-speed/download.html

    # January 5, 2010 at 2:11 pm

    The number of style sheets you have is personal preference, but you should really only have more than one if you’re introducing things like IE-Specific, Print, Mobile, etc.

    In your case, having "Home Page", "Product Page", etc etc… everyone has that! Sites that my company build can come with about 15-20 distinct templates (Home, Inside, Contact, Bylaws, What’s New, Calendar, Listings, Products, Staff, etc etc) – but they all call from the same CSS file.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".