Log in

View Full Version : Changing CSS files in real time - Please help



me_myself
11-12-2008, 05:26 PM
I have a css based website and have 4 different color schemes (css files) for it. I am planning on having 4 colored submit buttons, if the user clicks on a color, the corresponding stylesheet (external css file) should load. I've seen this done somewhere but i don't remember where i saw it.

Would be great if you can let me know how to do this or post a link to a tutorial or resource.

thanks a lot.

Snookerman
11-12-2008, 05:28 PM
This site might help you:
http://www.csszengarden.com/

Medyman
11-12-2008, 05:42 PM
CSS Zen Garden does dynamically load a CSS file, but it's based on the URL variable.

If you want to do it anonymously (without something in the URL), read this article (http://www.alistapart.com/articles/alternate/) on A List Apart.

me_myself
11-12-2008, 07:18 PM
Thanks a lot for the links guys, the list apart one is perfect for me. :)