PHP Script Codes > CSS-to-Inline Converter for HTML Emails
It's the biggest headache of being an HTML email programmer: e-mail clients like AOL, GMail, and Hotmail just don't like CSS. They only want the most plain and simple HTML. What is a great HTML artist to do? Now, you can still code a complete, and complex CSS document, along with a graceful, easy-to-read HTML email. No more wasted hours!
Using this class (or a handy web form which you'll have free access to at ViV Web Solutions), just pop in your CSS file, your HTML file, and the output file you want, and -- VOILA! -- a shiny new HTML complete with inline styles, ready to send.
The CSS-to-Inline Converter class honors the following advanced CSS rules:
- CSS rules of ordering (later entries take priority)
- CSS rules of precedence (appropriate id, class, tag, tag#id, tag.class, and #id.class prioritization)
- Comma-separated CSS rule entries (e.g. p#big,div#wide { ... })
Current Limitations:
- You must remove server-side code and javascript
- Does not parse a: pseudo-cla