Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Usability

Web Design Reference Guide

Hosted by

Get Your Site in a Festive Mood: How to Quickly Change Styles

Last updated Oct 17, 2003.

Let it snow! Let it snow! Animated snow on Web pages during this time of year is distracting, but it does provide a wintry, holiday feel. Those who use CSS for layouts have it made. It takes little effort to change a Web site's design to reflect the season. After the wrapping paper is ripped, the food is eaten, and the songs are sung, returning a Web site to normal is supah-fast!

Those using tables and <font> tags won't have an easy time of changing the mood of the site. One page could be done quickly, but converting many pages is tedious. You have to find all the <font> tags and color attributes and change them to reflect the new style. The table may or may not need modification depending on the image sizes and content between the <td></td>.

The steps are too easy for Web sites already using CSS with XHTML:

  1. Make a copy of your .css file(s).
  2. Modify the .css files(s) to your desire.
  3. Save a copy of the normal .css file(s) somewhere safe.
  4. Upload the new .css file(s) to the server with the same name(s) — this replaces the existing styles, hence the reason to save your default .css file(s) in a safe place.

That's it; you should be stylin'. If you go to the Web page and the old styles appear, try clearing the cache. Apply this concept anytime you want a new style. Heck, save all the new styles and let your users choose. A little scriptin' takes care of switching the style and making it the user's default every time he arrives. If you're using a blogging tool or content management system to manage your site, there may be simple instructions for switching styles available. Use a search engine to check it out.

I could explain how to create a script, but why reinvent the wheel when there are a few excellent resources for instructions on how to roll your own style switching script?

Share your new styles with everyone by letting us know in the Web Design weblog. The nice thing about this style switching business is that there is no untangling strings of lights and climbing ladders to get your Web site in a holiday mood.