Back at the beginning of February, I put up a post about MailChimp’s addition of support for media queries.
In the example I gave in that post I briefly touched on the thought that, using a media query, you could bump up your email’s text size. People showed interest in that idea alone, so let’s take another look at it.
As a new example, I’ll use the NextDraft newsletter. NextDraft is an awesomely entertaining daily news round-up written by Dave Pell, a writer whose blog is syndicated on NPR, Forbes, Huffington Post, and other big-name sites.
The NextDraft newsletter is perfectly suited to media query style-shifting. It’s an HTML email, and it’s primarily text-based:

Some of Dave’s readership complained about text sizes being too small on mobile platforms like the iPhone. That’s only the first part of the problem. When the subscribers zoomed in to make the text readable, the email’s width (and resulting line lengths) then forced them to scroll horizontally to read the email. Having to scroll horizontally on a phone screen to read through content is annoying at the best of times, and infuriating at the worst. So, the primary issue was the small font size, which made reading on a small screen a difficult prospect. Secondarily, there was the issue of email width, as the email had been coded to the standard width of 600px.
Here’s what the email looked like on an iPhone, unzoomed on the left, zoomed on the right:

Certainly not an ideal situation. Unzoomed, the email really can be difficult to read if you’re not sitting still, with the phone up to your nose. Zoom in, and the text is perfectly legible, but you then introduce horizontal scrolling, which is tedious.
For me, the ultimate mobile readability goal is arms-length reading. Anyone should be able to hold their phone (or tablet, to a lesser extent) with their arm comfortably extended and read an email without having to focus hard to stay on the same line of text or squint to see what they’re reading.
To that end, the first thing we can do is bump up the font size. As STYLECampaign’s Anna Yeaman points out in this blog post, Apple recommends a font size of 17-22px. For body copy, I’ve found that 19px or 21px both work well. At this size, sentences are arms-length readable, and little effort is required to keep your place in a paragraph.
Now we’re left with the email width problem, and that’s an easy one to solve. On a mobile screen, the ideal solution here is to have the email fill the screen completely, regardless of whether the phone is in portrait or landscape orientation. On email clients where the viewport is larger than a mobile screen, we want the email to act like a normal fixed-width email.
The code for this email’s media query is simple and straightforward:

The query activates when the device’s viewport width is 480px or less, which is the width of the average device in landscape orientation. Once it kicks in, the email’s width switches from a hard-coded 600px width to a 600px max-width rule, setting the upper limit for the email’s width. The actual working width of the email switches from 600px to 100%, allowing the email to fill the viewport of the device. No zooming required.
In conjunction, the email’s font size also changes. In desktop or webmail clients, the font size is set to 16px — a nice, comfortable size for a desktop monitor. When the media query is triggered, that font size gets bumped up to 19px, which looks great at arm’s length on iPhone and Android handsets:

The increase in font size, coupled with a fluid width layout makes this email as easy to read and the media query doesn’t interfere with desktop and webmail clients, so readers get a nice format regardless of reading platform. Not much work at all to make your subscribers happy.
And that’s that. Here’s a barking cat.
RT @stylecampaign: Using media queries to > font sz http://t.co/gmAlCwrD by @mailchimp (thx)
RT @MailChimp: MailChimp Blog | Using Media Queries To Improve Readability http://t.co/nd1WSUQs
Using Media Queries To Improve Readability http://t.co/OkW3h0Tm via @mailchimp
RT @unmatchedstyle: Using Media Queries To Improve Readability http://t.co/aNzmiaiR
RT @bdconf: Using Media Queries To Improve E-Mail Readability – http://t.co/lTjqIYNX
Or: why NextDraft is the prettiest email in my inbox. RT @bdconf: Using Media Queries To Improve E-Mail Readability – http://t.co/MXGt5irv
Media Queries Improve E-Mail Readability – can CSU adopt this and avoid this? http://t.co/Kp5dCZCI via @bdconf #yam http://t.co/uXPs96Xg
good stuff. RT @inboxgroup: RT @stylecampaign: Using media queries to > font sz http://t.co/nia0wDnT by @MailChimp (thx)
“@bdconf: Using Media Queries To Improve E-Mail Readability – http://t.co/MFB3YXnA” didn’t know email clients supported media queries!!
Thanks for this, any chance we could have the CSS as text for ease of copy and pasting?
RT @aarron: Using Media Queries To Improve Readability in Email http://t.co/Zu3J7R7Q via @mailchimp
How does this behave in Outlook? Blackberry? Have you tested across mail clients and OSs?
Thanks
I would like to know this is well!
Using Media Queries To Improve Readability -
on mobile clients, that is.
http://t.co/yAWbNwhn
Using Media Queries To Improve Readability http://t.co/Zv5LC30u #emailmarketing #mobile
did you know mail chimp lets you use media queries? http://t.co/FQsDhQnh
@DanDotLewis Yep! We talked about him a little here: http://t.co/EmhmI5th
Using Media Queries To Improve Readability | MailChimp Email Marketing Blog http://t.co/weLJltsD (via Instapaper)
Thank you, thank you for adding this feature! My clients who use MC will be thrilled! Further to Philip’s question, can I just use the code you used above (in the black box) and add it to the top of my ezines, blog posts, etc., in the HTML screen? Also, do I need to be using a MC template for this to work?
Thanks, responsive design is even more impontant on emails than on websites. Could you please add the instructions to change the big main images as well, as they (600px wide main images) don’t look too good on mobile devices..?
What about a…
img {max-width: 100%;
}
In some cases it’s not sufficient, but it should be a bit better. :)
I would also like to know how to implement this. It appears that it is not automatic, so where/how do I insert the code. Why wouldn’t I want this to just be automatically included with all my emails (image size?) ?
Mobile templates that come with this code by default will be launched soon. Until then, consider this a tutorial for our users who are very comfy tweaking their code.
dosnt work in gmail, do gmail support media query?
Gmail does not support media queries, in either their web client or mobile app.
I’ve just tried this out for iPhone and iPad and it works great. I wrote a little post about it. Fun stuff. Thanks for sharing this concept.
http://wesleyeterry.com/2012/04/emailed-media-queries/
Yeah .. this seems pretty much NOT USEFUL for the typical user who needs to work with MC’s templates. If you have anything less than what seems to be a proficient knowledge of HTML, this just isn’t helpful. I can make basic changes to HTML code, but I can’t figure out for the life of me how to use this for my coming Mailchimp email campaign. Bummer. … So close yet still so far … p.s. I would love to be proven wrong.
Hi Bryan, in an upcoming release, we plan to make these settings more easily available in our template design tool (for non-coders). Even so, this blog post is handy to bookmark as a reference for the fundamentals.
Both this post and the last about media queries miss one huge concern I have: emails use inline styles. So how does MC make this work? I always import a URL for my emails. But there is no mention in this post about whether or not MC imports info in the of the doc. Or whether it parses info in the head and re-writes it as an inline style. What does it do? How is it handled? Is MC serving people an entire html doc with a and a What??? AAAAAAAHHH
“head” and “body” were stripped out of my last comment because I wrote them as tags.
I am wondering how this works on platform different from iOS, like BlackBerry, Android, etc?
How would you tackle the display of high res images for retina display and others?
I’ve been trying to use “@media only screen and (min-device-pixel-ratio: 2)” to target high res display but it doesn’t seem to work…
Any ideas?
Hi Christophe, I was talking with Fabio about this a bit and he suggested just doubling the image size. Then you’d want to constrain it with HTML attributes on the image tag by default. Then in mobile environments you’d override those constraints whenever needed. I should also point out that if you’re using our new drag and drop editor it’ll handle all the heavy lifting for you when it comes to making things mobile friendly.