Instantly transform your CSS styles into inline style tag properties
If you’ve ever gone through the headache of coding HTML emails that can be read by all email clients (such as GMail, MSN/Hotmail, Yahoo, AOL and others), then this is the script you’ve been waiting for. Try it now!
There’s no way around it: most email client programs don’t like <style> declarations, or CSS code of any kind. They’ll ignore it; which means busted layouts for you, the hapless HTML email programmer.
Before the days of this wonderful tool, you would have to do one of two things:
- Completely ditch the stylesheet and design the email using each and every elements’ inline style=”…” property. This short-term solution causes serious headaches if any changes need to be made, since you would be deprived of the “cascading” luxury of CSS.
- Design the HTML email just like you would any other webpage, with CSS. So clean, so quick, so easy… until, of course, it’s time to send your masterpiece into the chaotic abyss of web-based email clients. Then, the real work begins. You troll through your CSS, cutting and pasting rule declarations into new style=”…” properties, all along wracking your brain to remember the CSS rules of precedence for classes, ids, and tags.
As you can see, the above choices aren’t the best use of your time. Lucky for you, we’ve invented a third choice: the CSS-to-Inline Converter. Try it now!
Features & Limitations
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 are advised to minimize the following in your documents):
- HTML: server-side code and javascript
- CSS: pseudo-classes like a:hover
New versions of the script will eventually eliminate the above limitations.
“Inline styles are inefficient and tedious, and I’m sure you’d ‘rather be golfing,’ but it works.”
– Mark Wyner, “CSS and Email, Kissing in a Tree,” A List Apart
The CSS-to-Inline Converter is featured on AjaxApp.com
Meanwhile, help render the CSS-to-Inline Converter obsolete by supporting the
Email Standards Project.