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

PHPBuilder:
Enabling Dynamic CSS with PHP
Nov 25, 2002 @ 14:20:11

Everyone who's anyone these days knows about CSS and HTML and how to use them effectively to make a site look better and be easier to maintain than with just font tags lying all over the place. There's only one problem - they're both static. Once you put the CSS and HTML out there, then that's all she wrote. Not so! Tons of people have discovered that its easy to output HTML with PHP, but now PHPBuilder shows you how to work with CSS in PHP to make your site easier for the user to configure and easier to theme.

They separate things up into a stylesheet file, as well as a "visuals.inc" file that will contain the actual configuration for the CSS, parsed by the index.php. They show you how to integrate the two and make it much easier on you and your users to tweak the site more to their liking - and allow various themed pages, similar to what EvilWalrus.com has.

It's a rather long article that gets into some pretty good detail on how you can get these technologies working together, and how it can help you on your site. Just remember - test your other layouts and choices that you offer to your users for configuring your site. One wrong option and it could really make a mess of things...

tagged:

Link:


Trending Topics: