I have wanted to experiment with different layouts and fonts on my site. I have a “beta” site on my LAN for experimenting, but it doesn’t have all the different parts of the site available. I had already heard of alternate style sheets, and since all this experimenting was mainly within the CSS code, that’s what I added.
Firefox (and Mozilla) allow selecting the style, but I was surprised to discover that they would not remember the selection from page to page. Reading the spec I realize this is considered “correct” behaviour (as far as the spec is concerned). But just how long is anyone going to keep re-selecting the style over and over? Not me…
A quick Google search on alternate style sheets provided a link to A List Apart with the solution. Working With Alternate Style Sheets is an excellent article complete with the necessary JavaScript code.
Now you can click on the Sans-Serif and Serif links at the bottom of the page to select a different font-set for viewing these pages, and the selection will be remembered throughout the site.
Another surprise was that people really have preferences on what kind of fonts they like to read. So while I was thinking of only leaving an alternate style in for a little while to experiment on the different looks, I guess the font style option is here to stay.
Kimmo Suominen — 28.5.04 @ 23:33
Nice layout!
Lahi — 5.6.04 @ 15:25
Thanks, Lahi! All it took was a number of sleepless nights tweaking the CSS… :-)
Kimmo Suominen — 6.6.04 @ 10:33