CSS - Using multiple stylesheets
Visitors on a website will almost certainly have different preferences regarding on wether the page should have a fixed or scalable width, want to hide the menu, different color schemas and font-sizes.
In this article I will describe how to offer multiple stylesheets for a page and how to let the user switch between them.
Base stylesheet
The first thing to create is a base stylesheet, with default values. If any values are not set in other stylesheets they will use these values. This enables one to create a stylesheet that e.g. only change the placement of the menu or its colors.
<link rel="stylesheet" type="text/css" href="/base.css">Secondary stylesheet - scalable layout
Let us say we would like to offer visitors the possibility to see the page using a scalable layout instead of the fixed layout specified in the base stylesheet.
<link rel="alternate stylesheet" type="text/css" href="/scalable.css" title="Scalable layout">