Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

CSS is Your Friend:
Making a PHP/CSS Switcher
Oct 15, 2002 @ 13:20:06

There's been a slow, hidden revolution in web design that the end users never even saw coming. People stopped using so many font tags and started using more and more CSS. Cascading Style Sheets are definitely the way to go these days, making your site much easier to manage with class links back to a main listing of features, allowing you to change things on your site at whim, and A List Apart is going to help you even more.

In their latest article, Build a PHP Switcher, they show you how, step-by-step, to create a style-sheet switcher for your site. How is this useful, you ask? Well, say your normal template and CSS scheme is too small for some users - maybe a visually-impaired user comes to the site and just gives up. Well, with this kind of switcher on your site, you could have a CSS scheme that would make all the font sizes larger with the click of a button. They even show you how to keep the setting that the user likes and, when they come back, show it again.

While they use a select list to make the script work, this simple code can be adapted to work with just about any kind of selection technique that you want, including just a simple link with a little something extra tacked onto the query string.

Thanks to Dewey for the link...

tagged:

Link:


Trending Topics: