Changing CSS style sheets via hyperlinks

Soldato
Joined
11 Apr 2004
Posts
19,916
Hiya guys,

Very quick one here I imagine. I'm a bit of a CSS n00b so I apologise in advance.

Say I had 3 different page styles defining different font sizes and colours, how could you build this into a HTML page allowing the user to click a link to change the appearance of a page?

I'd imagine you would need separate CSS pages and have a link to each style sheet allowing the user to click depending on their preference?

Also, is it possible for the browser to remember the selection, selecting the correct style automatically when the user clicks on a link to another page?

Cheers.
 
Last edited:
This will help you.

It also deals with remembering the selection via cookies. The may article seem like a big or complex job but it's not really, depending on your level of javascript understanding, it can be knocked together in less than 2 mins.
 
Back
Top Bottom