This page demonstrates CSS Style Switcher option.
Please click on the following color packages to view different background colors.

Background Colors:

HomePage

These are the steps to create this effect:

Add the following codes between your header tags.

<link href="styleA.css" rel="stylesheet" type="text/css" title="default" />
<link href="styleB.css" rel="stylesheet" type="text/css" title="alternate" />
<link href="styleC.css" rel="stylesheet" type="text/css" title="any" />
<script type="text/javascript" src="styleswitcher.js"></script>
Add the following codes between your body tags.
<a href="#" onClick="setActiveStyleSheet('default'); return false;" class="button"> Default Color Package</a>
<a href="#" onClick="setActiveStyleSheet('alternate'); return false;" class="button"> Green Color Package</a>
<a href="#" onClick="setActiveStyleSheet('any'); return false;" class="button"> Pink Color Package</a>
Write "styleA.css" file with the following code line.
body {background-color: #99CC99;}
Make two copies of "styleA.css" and rename as "styleB.css" and "styleC.css"
Revise the following codes in "styleB.css" file.
body {background-color: #CCFF99;}
Revise the following codes in "styleC.css" file.
body {background-color: #FFCCFF;}
Then write a javascript file, to be continued...

Hosted by www.Geocities.ws

1