|
CSS Skins
|
|
Hey, two websites in one! Skin One | Skin Two I first saw this done on Zeldman.com and then saw it again at Meyerweb.com. While I'm not sure where you would apply this, I think it has potential and so I don't forget, I'm documenting it here as a tutorial. If you can make use of it too, great. |
|
Step One - The Styleswitch Engine. Now, the most important thing about making this work is throwing (what I call) the styleswitch engine under the hood. The styleswitch engine is a javascript file with all the code to do this. To get the engine installed, this is what you do: First, this is what the styleswitch engine actually looks like PICTURE in physical form. Notice what a nice engine it is too! I don't know much about this but I do know that this has a built in cookie maker that remembers what skin your visitor preferred last time they came to the site and switches to that skin when they come back. Very nice. (Damn there are a lot of smart people out there!) Now, select and copy the code in the following table. This is what the styleswitch engine looks like as code.
Now we need to save the code as a javascript file for our page to use. Lets make a javascript by selecting FILE > NEW SPECIAL > JAVASCRIPT. Like this: |
|
Step Two - Create Your Stylesheet. Next, we need to make a style sheet to control how our page looks. I have explained to some extent how this can be done in GL6 HERE and HERE. I'm sure most people grasp this but it took me a bit to get there. Have a look if you need help working style sheets. The important thing is that you save your stylesheet as an external stylesheet and link to it in the CSS editor window. I've used the stylesheet that I used for the rest of my tutorial pages. For the purpose of this tutorial, I've renamed it 'tutoriallight.css'. Now we need to link it to the page. Do this by opening the CSS Editor window and adding a blank link to an external stylesheet like this: ![]() Then, in the inspector pallet, link it to the stylesheet you've created for your page: ![]() Your CSS Editor window should now show that you have linked to your external stylesheet like this ![]() Roll in to the next step but take a small break if you need to. You will need to be creative again and should be mentally pristine. |