Can I include a print stylesheet in my campaign?
We've published a follow-up post with more recent results - view it here.
We recently had a few customers approach us about print stylesheet support and whether or not they can include them in their campaigns. We weren't sure either, so we did some testing to get to the bottom of it once and for all.
What is a print stylesheet?
Quick background, print stylesheets basically allow you to set a different set of CSS rules when you print the page to the one you see when viewing it on screen. For more details, check out Eric Meyer's great intro. By specifying a print stylesheet for our newsletters, we could ensure when a subscribers prints our email they see a much more print friendly email that might use simpler formatting and even hide some elements of the email itself.
The test
Because most email environments won't let us link to an external CSS file, we used the @media rule to specify our print only styles (more on this here). Here's a quick sample of the code we used:
<STYLE type="text/css">
@media print {
p.printme { font-size: 10px; color: #f00; }
}
@media screen {
p.printme { font-size: 40px; color: #000}
}
</STYLE>
The results
| Email support for the print stylesheet | |
|---|---|
| Email environment | Print version support |
| AOL 9 Security Edition | |
| Gmail | |
| Hotmail | |
| Yahoo! Mail | |
| Microsoft Outlook 2003 | |
| Microsoft Outlook Express | |
| Lotus Notes | |
| Mac Mail | |
| Microsoft Entourage | |
| Eudora (Mac) | |
| Eudora (PC) | |
As you can see, the results were quite varied. None of the web-based email environments supported the print-friendly version, but most of the desktop environments did. Ultimately, we can put this down to lack of support for the @media rule. Unfortunately, since none of the web-based environments support the use of the link element for embedding external stylesheets, the @media rule is the only option available.
Conclusion
From our quick tests it appears that including print styles via the @media rule doesn't do any harm in email environments that don't support it (as they are ignored completely). If you're sending an email like an invitation with specific details or any other kind of email your recipients are likely to print, you may want to consider adding a few print specific styles if it will make your email easier to read.
If any of you guys have had other experiences with print stylesheets and have anything to share, I'd love to hear it.
Posted in: Tips & Resources
Comments for this entry are closed.
Browse the Blog
- Behind the Scenes (28)
- Interviews & Buzz (132)
- New Features & Updates (229)
- Observations & Answers (210)
- Release Notes (1)
- Tips & Resources (477)
Explore the Email Gallery
- All designs
- One column (368)
- Two column (221)
- Three column (33)
- Announcement (126)
- Newsletter (445)
- Invitation (37)
“How We’re Hacking Email at @HubSpot” - great code tips here from @hijonathan! http://t.co/L9QGsdjA ^RH
Follow us on TwitterAbout • Our Book • Contact • API • Anti-spam Policy • Terms of Use • Privacy Policy
Proud founders of the Email Standards Project and supporters of the design community.
2 Comments
Daniel
November 17, 2006 9:04am
I find the easiest way to deal with this is to direct the reader to an online version so they print from a web browser rather than through their email platform. You can at least implement a good print style sheet that will be largely supported.
Mark Wyner
April 5, 2007 4:19am
I recently had a client who was very concerned with the printed version of their email template. I hadn’t previously spent much time working on print style sheets for emails, but I assumed the process would work the same with email clients as it does with web browsers. It indeed worked across the board (at least in all of the clients I tested).
One doesn’t need to go through the process of using techniques such as @media for this. It’s as simple as pie:
<style type=“text/css” media=“print”>
This standard media attribute works as it is supposed to. So that’s how one can use print style sheets within an email.
Enjoy!