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 6 of 6
  1. #1
    Regular Coder
    Join Date
    Aug 2004
    Location
    The Netherlands
    Posts
    211
    Thanks
    0
    Thanked 1 Time in 1 Post

    Is it better to put everything in 1 stylesheet, or spilt them

    So is it better to have one bloated stylesheet with the CSS of the entire site, or have one stylesheet with the template CSS and have other page specific stylesheet that only have CSS for elements that only occur on that page (like I have on my site and like on Mozilla's website?

  • #2
    Regular Coder
    Join Date
    Sep 2004
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts
    IMO, it kinda depends on how much CSS you have. It seems like you have quite a bit so it would be a good idea to have a couple. Also, wouldn't the load time be faster with more than one style sheet? Just my 2 cents.

    Note: I am not near to being an expert, (I'm more like a beginner/intermediate), so my advice might be bogus

  • #3
    Regular Coder
    Join Date
    Aug 2004
    Location
    The Netherlands
    Posts
    211
    Thanks
    0
    Thanked 1 Time in 1 Post
    Yeah, that's also how I think about it, but I just wanted some people to confirm this.

  • #4
    evo
    evo is offline
    waka Ionsurge
    Join Date
    Feb 2005
    Location
    United Kingdom
    Posts
    895
    Thanks
    5
    Thanked 12 Times in 12 Posts
    Using the one would probably make less of an impact, seeing as it would be loaded the once and cached when used in other pages in a site.

    The only reason I would use more than one stylesheet is if I had certain features that were unique to a template.

    Global styles would originate from a master sheet. Style-specific from a sheet within the template folder.

  • #5
    Regular Coder
    Join Date
    Mar 2005
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i only use one stylesheet, it's just much easier for me to edit things and it looks cleaner (at least for me it does)

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    On the other hand, you could seperate your stylesheet into two files: one for structure, and one for presentation.

    Then use the structure file to control the layout and structure of your page and it's elements. In the appearance file, add rules to control the appearance of the page: colour, background colour, fonts, background images, borders, and so on. Without affecting the layout of the page.

    Doing it this way, you'll wind up duplicating a lot of selectors, but you'll be able to more easily fins what you're looking for. It's also easier to set up alternate style sheets, one for a different colour scheme. So if you have differnet colour schemes with different fonts and images and such, put each one into a stylesheet file, link each file to your page, then you can allow site visitors to choose a scheme they like.


  •  

    Posting Permissions

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