Results 1 to 3 of 3
Thread: CSS Accessibility
July 2nd, 2007, 09:23 AM #174Registered User
When designing a website using CSS, is it better to create external style sheets for each page? Or better to keep it all in the one external stylesheet??
For example: If I have a design layout for a website, I obviously use this one stylesheet throughout the site to keep continuity. But I tend to use internal styles on seperate pages, if the pages differ in format layout such as text and graphics.
Would it be betteror even more efficient to create an external sheet for each of these pages??
July 2nd, 2007, 09:34 AM #21,256Registered User
This basically has no effect on accessibility/useability/SEO etc.
You are right to move all your CSS into an external stylesheet - having a lot of inline styles, or chunks of CSS in the header is generally bad practice for a number of reasons. Mainly SEO (SEs will read all the CSS code, generally diluting the importance of your 'real' content), and also load times (the CSS will be re-read everytime you go to a new page.
So if everything's in an external file, the rest is really down to preference. You might like to have a main stylesheet that is referenced by all pages, and contains the consistent elements of each page, while also having a seperate 'page specific' stylesheet also referenced from each page (or type of page). You might want to contain everything in one stylesheet, except for text properties in a seperate stylesheet, making it easier to update font appearances. This is actually something I do If I want to implement a font-size switcher - have 1 stylesheet with everything except text properties - when you want to change text sizes you merely run a JS function that changes the current text stylesheet.
Basically, as long as its external, it's fine, the rest is down to you.
July 2nd, 2007, 09:40 AM #374Registered User
Thanks for the reply Duncan, you response is informative and appreciated