css switch (php only)
Personally, I am very fond of Style Sheet Switchers (I’ve been meaning to put one on this site for ages now, oh to have more hours in the day! I will find the time – one day). For me – they add a certain playful touch to the site if done creatively. They are however much more important functions to consider so a style sheet switch function is not only a little bit of eye candy or simply a superficial feature but can also add to the accessibility of a website. It is good to offer an alternative colour scheme which would switch the page from light coloured text on a dark background to a dark coloured text on a light background, for example.
With a lot of different options and techniques out there I would still favour a simple switch using only PHP. This will work reliably with or without enabled Javascript. I’ve put together a demo which also includes the steps and code snippets.
28/07/2009
ilze says:Thanks Prisca for tutorial:)
I will try definitely.
30/07/2009
prisca says:Ilze, you’ll have fun with this one – works beautifully :)
and do show us what you’ll be doing with it ;)