Styles, On-Page/Link Hybrid a good idea?

Discussion in 'CSS' started by Josh Inno, Apr 25, 2007.

  1. #1
    Okay, I've been working with CSS long enough to understand the benefits of having the CSS styles I use in more than one place in an external file. I change the style one place, it changes it everywhere.

    But what about the styles that only affect an individual page? If I load those into the site-wide styles, won't that bloat the code as far as other pages are concerned, increase bandwidth, and slow down page load-time?

    Do any of the CSS experts out there split their CSS code between site-wide code in an external file, and page specific styles in the top of the page it's self?

    If so, what advantages do you feel you enjoy from this. What drawbacks have you found?

    If not, why not? Are there any circumstances you might use this technique in?
     
    Josh Inno, Apr 25, 2007 IP
  2. Mr Blonde

    Mr Blonde Guest

    Messages:
    142
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    the bandwidth that would be increased for extra styles would me miniscule. The stylesheet is only downloaded once for the site unless you refresh or clear the cache so it would actually probably be better to include it all in the one if your concerned about load times.
    Usually if im trying to do something quickly that i know i wont need a specific style for again, (like changing a specific heading to red for example) i would sometimes just add an inline style to that element. I never used embedded styles though unless i need to show a style differently on a certain page that has that style referenced in the stylesheet. the reason i dont use them is that if i am going to create a style for something i may as well do in in an external stylesheet so if i ever need it again it's there for the taking. plus i find it easier for site updates if i can just go straight to the stylesheet
     
    Mr Blonde, Apr 25, 2007 IP