Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use separate style sheets

    I have three different pages that are about 75% the same styling. Should I use one style sheet including all the styles or separate sheets for each page.
    Thanks

  • #2
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    It depends really. When one page is loaded the browser will cache the stylesheet, so if you want it all to load in one go then stick it all in one stylesheet. It's also easier to keep track of as long as you use comments to separate sections.

    However, if it's not much in the way of file size then using three would be fine too. It's up to you really, just consider the future of the site and whether you think it'd be easier to keep the styles together or separate them
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #3
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Code:
    <style type="text/css" media="screen">
    	@import url("master.css"); /* cross‐document styles here */
    	/* page‐unique styles here */
    </style>
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •