PDA

View Full Version : Changing a website's look or theme?



TaylorH
22 Jan 2010, 01:35 AM
I want to know how to allow a user to change a websites look. It websites that have different themes or color schemes, like on the Gamespot homepage. How is this accomplished?

I have two theories.
The button changes a variable that causes the HTML file to reference a different CSS file. Ie 'IF x = 1 THEN reference stylesheet1.css' 'IF x = 2 THEN reference stylesheet2.css'.

Or

The button changes a variable that causes the HTML file to reference a different part of the CSS file. Ie 'IF x = 1 THEN reference top half of stylesheet.css' 'IF x = 2 THEN reference bottom half of stylesheet.css'.

Or am I completely off-base here?

I am looking for a solution to change an entire website's look, not just it's color scheme, but layout and everything, based on the user's input.

Thoughts?

Drew Bolles
26 Jan 2010, 02:17 PM
You could accomplish it by simply doing what you said, basically, you have a form that submits a variable to whatever URL, and you have a script that says, if variable exists, use different CSS link, else use regular form. It can get much more complicated, but that is one way.