summaryrefslogtreecommitdiff
path: root/old/published/Webmonkey/Monkey_Bites/2006/12.25.06/Fri/css-alternate-sheets.txt
blob: 44ed1964d15f66f2caa6b62efb9c346d009bbe5f (plain)
1
So you've got a pretty good handle on CSS and your design is well separated from the actual markup of your site, but now you're thinking you'd like to offer multiple style sheets. Perhaps you want to offer a high contrast design to users with visual difficulties so your site is easier read.

Or perhaps you just want to have two, three or even ten different designs available for your readers. Well it isn't hard to serve up multiple style sheets. Just add the appropriate <code>link</code> tags to your document's header. 

Of course if that were the end of the story there wouldn't be a need for a tutorial. Naturally that isn't the end of the story.

The W3C spec says that browsers should offer users a way to switch style sheets, it even suggests that browser manufacturers offer a drop–down menu or tool bar. But there's one browser that fails to implement that suggestion, anyone care to guess which one?

So what to do for poor Internet Explorer users who have no way to switch style sheets? A List Apart (ALA) has the answer in a fine tutorial entitled *[Alternative Style: Working With Alternate Style Sheets][1]*. 

In the end you'll need to add a smidgen of Javascript to your pages, but don't worry, it isn't too difficult and ALA author Paul Sowden provides all the necessary code.

ALA is also a fantastic reference for all sorts of other CSS solutions including the famous [Suckerfish dropdown][2] menu.

[1]: http://alistapart.com/stories/alternate/ "Alternative Style: Working With Alternate Style Sheets"
[2]: http://www.alistapart.com/articles/dropdowns/ "Suckerfish dropdowns"