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 Yes
Gmail No
Hotmail No
Yahoo! Mail No
Microsoft Outlook 2003 Yes
Microsoft Outlook Express Yes
Lotus Notes No
Mac Mail Yes
Microsoft Entourage Yes
Eudora (Mac) No
Eudora (PC) Yes


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:

2 Comments

  1. 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.

  2. Campaign Monitor team member

    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!

Comments for this entry are closed.

Explore the Email Gallery

“How We’re Hacking Email at @HubSpot” - great code tips here from @hijonathan! http://t.co/L9QGsdjA ^RH

Follow us on Twitter