March 21, 2005

Blog Skinning

Ok, I'm working on skinning my blog so that I can play with different stylesheets on the fly. One of the results of doing this is the addition of cookies to my site that will remember which skin you choose, so that all of the pages pick up the new skin. I found a lot of useful references on the web, but no one site was more helpful than the next. Most places that I looked at used server-side scripts to skin their blog. Instead, I am choosing to use multiple stylesheets with Javascript to switch between stylesheets.
To do this, you place link tags in your header that load in the different stylesheets. Then, there is Javascript linked to the option box (top right of this page) when the value is changed. It uses DHTML to switch the active stylesheet to the one that is chosen. A List Apart had the necessary Javascript code for switching the stylesheet on the fly. I'll work on some stylesheets that are actually attractive (as opposed to the only alternate that is up there now).
One thing that this work is doing is helping me to understand page layout more and more, as well as understand some of the nastier CSS bugs in the Internet Explorer display code.

1 comment:

Anonymous said...

Nice job.

I need to learn to use CSS better so that I can design my own look instead of downloading different looks and just chaning the content to suiy my needs.