Hi guys, not posted in here for a while, just wondering how this is achieved: i'm looking to have a website with the user having the option to change the entire color scheme at the click of a mouse for example, if i have a site that is beige colored by default, the user can click on either red or blue and the entire site will change to a red version etc a good example of this is on the http://www.msn.com/ website, they have a page options drop down box with the option of changing the color to blue, red, green etc i assume it changes the style sheet and what not but just wondering how i would go about doing it thanks in advance for any comments Alan
You can use Ajax to do it or just about any server-side scripting language. If you google for ajax css switchers, you'll find lots of examples.
cheers cesay, i'll get onto it now and see what i can find, do you know if ajax is what msn use for my above example?
I know you can do it with MooTools. Check out this demo for an example of what it does. If you need help implementing it, their forums are friendly.
thanks for the reply luckybee but i'm looking for an easier way which i'm sure there is of achieving this, maybe some simple javascript and css
PHP Smarty templates are unnecessary, and add more bloat than they're worth. A simple JavaScript or PHP based stylesheet switcher that stores a cookie on the user's computer to save the preference is better, uses less code, saves bandwidth and cuts down on the number of processes used by the server.
www.alistapart.com has what you are looking for (a site search for "PHP stylesheet switcher" should get you a direct link) I really don't recommend ALA for a lot of things these days, but their stylesheet switchers (not to mention CSS Sprites) are top-notch.