Trading Applications Developer (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

PHP Enabled Stylesheets
Introduction
CSS Stylesheets are a major improvement in the World Wide Web, allowing HTML to come back to its roots: a language to structure and publish content on the web, not to apply a visual formatting to that content. Unfortunately HTML and CSS have the same limitations: both are static languages!
From Perl scripts to PHP, a lot of technologies are today available to move HTML to the dynamic age but why not, going even further and do the same with CSS? That's what I did when developing eDContainer (a container for web sites and web applications), having the following objectives in mind:
  1. To provide an external, user-friendly, visual configuration file: the user doesn't have to edit the stylesheet, he may not be familiar with CSS and even if so, properly editing a stylesheet requires some experience.
  2. To not have to repeat general identical values like fonts and colors x times within the stylesheet: the value is defined once in the visual configuration file and inserted automatically by PHP in the different locations within the stylesheet.
  3. To provide a solution to the implementation of skins or themes (similar to Winamp or Windows XP principles): several different visual configurations can be defined and dynamically switching from one to the other is possible.
  4. To be able to change some style behaviors dynamically, depending on some configuration values.
If you're quite familiar with PHP and CSS, reading the above objectives will probably make you already think about some solutions to achieve them. That's the fun about coding, always different and sometimes better ways to obtain the same results! When writing this article, I'm not saying that what is described here is the only way to do it. It's a way and I hope I'll manage to keep you interested: Let's start!
[ Next Page ]


Comments:
Broken linksDave N.10/04/05 08:26
RE: php interfaces & classesEdson Luk04/22/05 14:30
how to start creationg CSS in PHPPattan11/18/04 07:16
RE: Caution!Kaare05/22/04 15:19
RE: How is this better than...Jesus A. Domingo12/28/02 14:04
RE: Template: Separate Design from ContentsBertrand Potier12/28/02 09:57
RE: Caution!Jetboy12/21/02 14:18
RE: Caution!Jason12/19/02 09:42
MIME Typeg_a_t_e12/18/02 07:18
<STYLE> TagBrad12/17/02 23:12
Template: Separate Design from ContentsJean-Marc Molina [goa103]12/14/02 20:59
Caution!Jetboy12/14/02 16:49
Very interestingTristan Crickett12/09/02 14:39
RE: How is this better than...Timothy Western12/04/02 08:44
RE: How is this better than...Bertrand Potier12/04/02 01:59
RE: How is this better than...CrazyToon12/03/02 19:15
RE: How is this better than...Eric12/02/02 21:09
How is this better than...Ross Bemrose11/28/02 07:48
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.