Skip navigation

Using CSS in PHP

Thanks to a heads-up from Weblog Tools Collection, a must-monitor blog resource site, I learned that Chris J. Davis has been at it again with Variables in Your CSS Via PHP.

It is really a no-brainer to want to take some common CSS elements and simplify the process of changing them or updating them. Before we get any further though, let me stress that this is a limited use technique. The very nature of CSS is to cascade, which would be defeated by this if you went nuts with it.

So lets take a very simple example; we want to define the base color scheme and font families we want to use for body, h1 and our menu. Lets move those into PHP so that we can update them all with one small change.

This amazing author of such awesome articles for WordPress users like Secrets of WordPress Theming and Podcasting With WordPress, among many others.

Site Search Tags: , , , , ,
Copyright Lorelle VanFossen

2 Trackbacks/Pingbacks

  1. […] Using CSS in PHP […]

  2. […] Using CSS in PHP […]

Post a Comment

Required fields are marked *

%d bloggers like this: