View Full Version : saw some web site allow user change the color scheme of webite....

07-02-2002, 07:12 AM
i saw some web site allow user to change the color scheme of webite....i know they save user setting to database, but how they control the set of graphics and CSS file????

any tutorial? or idea?

07-02-2002, 12:01 PM
this (http://www.alistapart.com/stories/n4switch/index_bak.html) is the style switcher, from A List Apart (http://www.alistapart.com/). I have a similar script that i wrote, that lets users write their own style sheets, though it's pretty useless, if you don't have a big regular following, like slashdot, or this forum.

07-02-2002, 04:31 PM
I guess its simple enough to control the color-scheme....but as far graphics are concerned you require a server-side lang.

07-02-2002, 04:34 PM
no, that could be done with javascript as well. the could would just be bulkier, then.

07-03-2002, 04:17 AM
actually i'm usinng ASP, then is it more easier to control???

07-03-2002, 04:31 AM
If you fully separate content and layout, you can use:

<link rel="alternate stylesheet" title="Alternate layout" type="text/css" href="bla.css"/>

Modern browsers are supposed to be able to do this, but the only I've used which supports it is Mozilla/Gecko - I believe there is one other lesser known browser too that does this...