- Featured Columnists
Table of Contents
- Web Basics
- Publishing on the Web: Putting Files on the Server
- Web Design Process and Workflow
- Project Management
- Mark My WWWord: HTML and XHTML
- Standards Compliance
- Visual Design and the Web
- Color Theory
- Working with CSS
- How to Create CSS Menus
- How Should Web Designers Manage Layouts?
- Shining Examples of Bad Design
- Get Your Site in a Festive Mood: How to Quickly Change Styles
- Designing Mobile Web Sites
- Designing for Mobile Devices
- Books and e-Books
- Online Resources
- Meta Tags and Search
- Enhancing Web Page Interaction
- Web Graphics
- Web Page Optimization
- Overview of Servers
- Server Programming Basics
- Careers in Web Design
- Intellectual Property for Web Designers
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:
- Make a copy of your .css file(s).
- Modify the .css files(s) to your desire.
- Save a copy of the normal .css file(s) somewhere safe.
- 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?
PHP Style — this uses tables in its example, but ignore that and pay attention to the code.
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.