css switch (php only)

mainvisPersonally, 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.

» view tutorial & demo

22/06/2009 blog,handcoding

4 Responses to “css switch (php only)”

  1. Gravatar ilze says:

    Thanks Prisca for tutorial:)
    I will try definitely.

  2. Gravatar prisca says:

    Ilze, you’ll have fun with this one – works beautifully :)
    and do show us what you’ll be doing with it ;)

  3. Gravatar Addie Spritzer says:

    Hi there, superb site you have right here, however I simply needed to tell you about what may perhaps most likely be considered a browser compatibility issue. I’m using Windows Vista 32 bit together with Flock, and the formatting is strange. It’s just a bit difficult to see certain regions of your blog, and I’m running my screen resolution at 1024 x 1024. I’m certain you didn’t aim for your site to seem so strange, and so is there any way it is possible to help me solve this problem?

  4. Gravatar prisca says:

    Addie,
    thanks for your comment and sorry to hear my site is not displaying correctly. I’ll check in Flock and see what I can do to fix it.
    If you could tell me what exactly is going wrong for you? Thanks.

graphiceyedea prisca schmarsow – portfolio

portfolio