...

View Full Version : Let the user select the css stylesheet



Andy92
08-26-2006, 09:52 PM
Hi there,

Is there any way that i can make something that goes on my site in every page, where the user clicks on a selected style and it will use a seperate stylesheet.

Eg: A user wants my site in red, so they click on the red style and it will use only parts of a seperate stylesheet. So it changes the background to red, but still reads the old stylesheet but everything i put in the red stylesheet it will use and overwrite what it says in the old stylesheet.

This way the user will be able to choose what style they like my site in.

Also, is there any way it can make a cookie and store it so that the next day when they go back to my site, it will display the same style that they chose the previous day?

Is there any way to do this using php or javascript?

:confused: :confused: :confused:

Kravvitz
08-26-2006, 10:36 PM
Yes.

You want a stylesheet switcher (http://www.google.com/search?q=stylesheet+switcher).

Avoid scripts found on DynamicDrive.

Andy92
08-27-2006, 12:37 AM
Ok,

I have had a look at this one...

http://www.alistapart.com/stories/alternate/

And i can't get it to work on my site?

Kravvitz
08-27-2006, 05:14 AM
You set the rel attributes wrong in two of the <link> elements.

Andy92
08-28-2006, 02:05 AM
Ok thanks,

But i have followed a different turorial now and its all done with php.

It works fine. I am still working on it, but it works on the home page.

Have a look at http://www.allsortshop.com

Thanks! :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum