PHP + CSS Dynamic Text Replacement

16th Nov 2007

In the wake of recent web font news here's a technique for generating text replacement dynamically with CSS and PHP... and no JavaScript. In theory it sounds like a winner but it does have some limitations:

  1. You can't give your headings an id or class or any other attributes
  2. You can't have long heading text -- there is no word-wrapping (For word wrapping, check out João Makray's word wrapping fix.)
  3. You can't change the heading styles from page to page on the same site