Responsive
About 60-70% of email opens happen on mobile. The web-style “responsive” approach — media queries that swap layouts at breakpoints — works in modern clients, but Outlook for Windows ignores media queries entirely. The reliable pattern is hybrid responsive: build a layout that works at any width by default, and use media queries only as enhancement.
The 3-table-level wrapper (start here)
Section titled “The 3-table-level wrapper (start here)”Every responsive-safe email uses the same three nested table levels. Get this right and most mobile bugs disappear before you write a media query.
<!-- LEVEL 1: OUTER wrapper. Full viewport width. Page background goes here. --><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="width:100%;background-color:#F5F5F5;"> <tr> <td align="center" style="padding:20px 10px;">
<!-- LEVEL 2: CONTAINER. 600px desktop, fluid on mobile. ONLY level with a fixed width. --> <!--[if mso | IE]> <table role="presentation" align="center" width="600" cellpadding="0" cellspacing="0" border="0"> <tr><td> <![endif]--> <table role="presentation" cellpadding="0" cellspacing="0" border="0" style="max-width:600px;width:100%;margin:0 auto;background-color:#FFFFFF;"> <tr> <td>
<!-- LEVEL 3: INNER content tables. Always width="100%". NEVER 600. --> <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td>Header content</td> </tr> </table>
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td>Body content</td> </tr> </table>
</td> </tr> </table> <!--[if mso | IE]> </td></tr> </table> <![endif]-->
</td> </tr></table>Three rules to keep in your head:
- OUTER is
width="100%". It’s the page background, edge-to-edge. - CONTAINER is the only place a fixed
600shows up — and it’s inside the MSO conditional. Modern clients see onlymax-width:600px;width:100%, so they shrink it on narrow viewports. - INNER content tables are
width="100%"— neverwidth="600". Hardcoding600on inner tables is the #1 cause of horizontal scroll on mobile.
Most of the rest of this page is variations on this base. If you’re getting horizontal scroll at 320-400px, the first thing to check is whether an inner table inherited width="600".
The two strategies
Section titled “The two strategies”Strategy 1 — Media queries (modern clients)
Section titled “Strategy 1 — Media queries (modern clients)”<style> blocks in the <head> work in Apple Mail, Gmail web, Outlook.com, mobile clients. They do NOT work in Outlook desktop (Windows). For any client that supports them, this is the cleanest pattern:
<style> @media only screen and (max-width: 600px) { .email-container { width:100% !important; } .stack-column { display:block !important; width:100% !important; } .stack-column img { width:100% !important; height:auto !important; } .mobile-hidden { display:none !important; } .mobile-only { display:block !important; } .mobile-padding { padding:16px !important; } }</style>Then mark each element you want to behave responsively with a class:
<table class="email-container" width="600"> <tr> <td class="stack-column" width="50%">Column 1</td> <td class="stack-column" width="50%">Column 2</td> </tr></table>Strategy 2 — Hybrid (works in Outlook desktop too)
Section titled “Strategy 2 — Hybrid (works in Outlook desktop too)”The hybrid approach builds a fluid layout using max-width + ghost tables. Even without media queries, the email collapses cleanly when the viewport is narrow. This is the pattern for every side-by-side layout: two cards, image + text, a row of three features.
<!-- In the head: full-width columns once they stack --><style> @media only screen and (max-width: 600px) { .column { display:block !important; max-width:100% !important; } .column-cell { padding:0 0 16px 0 !important; } }</style>
<!-- Two cards inside the usual 40px side padding: 600 - 80 = 520, so each column is 260 and the ghost table is 520. This cell holds only the row. --><td align="center" valign="top" style="padding:0 40px;"> <!--[if !mso]><!--><div style="font-size:0; text-align:center;"><!--<![endif]--> <!--[if mso]> <table role="presentation" width="520" align="center" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="260" valign="top"> <![endif]-->
<div class="column" style="display:inline-block; width:100%; max-width:260px; vertical-align:top; text-align:left;"> <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <!-- Half of the 16px gutter, inside the column --> <td class="column-cell" valign="top" style="padding:0 8px 0 0;"> <!-- The card is its own table, so the gutter stays outside it --> <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color:#F3F4F6;"> <tr> <td style="padding:20px; text-align:left; font-family:Arial, sans-serif; font-size:15px; line-height:22px; color:#1A1A1A;"> Card 1 content </td> </tr> </table> </td> </tr> </table> </div>
<!--[if mso]> </td> <td width="260" valign="top"> <![endif]-->
<div class="column" style="display:inline-block; width:100%; max-width:260px; vertical-align:top; text-align:left;"> <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <!-- The other half of the gutter --> <td class="column-cell" valign="top" style="padding:0 0 0 8px;"> <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color:#F3F4F6;"> <tr> <td style="padding:20px; text-align:left; font-family:Arial, sans-serif; font-size:15px; line-height:22px; color:#1A1A1A;"> Card 2 content </td> </tr> </table> </td> </tr> </table> </div>
<!--[if mso]> </td> </tr> </table> <![endif]--> <!--[if !mso]><!--></div><!--<![endif]--></td>This produces:
- Outlook desktop: sees the MSO ghost table → renders two 260px columns side-by-side, with the 16px gutter from the padding inside them.
- Every other client: sees the inline-block
<div>s → they sit side-by-side when there’s room for both, stack vertically when narrower (becausemax-width:260pxlets them shrink to 100% wrapping). The media query then makes the stacked columns full width; without it they stack at 260px, centered.
The row works without ANY media query; the query only polishes the stacked view.
Rules that keep the columns side by side:
font-size:0on the wrapper<div>. Inline-block columns sit on a line of text, so the line break between one column’s</div>and the next<div>renders as a space, about 4px. 260 + 4 + 260 doesn’t fit in 520, and the second column drops below the first on every screen.font-size:0makes that space zero-width. The wrapper is inside[if !mso]because Outlook lays out the ghost table instead, and Word has no zero font size.- Every text cell sets its own
font-size. Text inherits the wrapper’sfont-size:0and disappears otherwise. Each column<div>also setstext-alignto the reading start (left, orrightin an RTL email; see RTL), so its content doesn’t inherit the wrapper’scenter(the wrapper still centres the columns themselves). - The widths add up exactly. Work out the width of the area the row sits in first: the container width minus the side padding around the row. Each column’s
max-widthis that width divided by the number of columns, and the ghost table and its cells use the same numbers. Full-width row: 600 →300+300. Inside 40px side padding: 600 − 80 = 520 →260+260, ghost tablewidth="520". Inside 32px: 536 →268+268. Don’t subtract the gutter: it is padding inside the columns (next rule), so a 16px gutter in a 520 row still gives260+260, not252+252. Even 1px over and the row wraps; under, and the columns stop short of the edges. - The gutter goes inside the columns. No spacer
<div>between them, and no spacer cell in the ghost table either: its cells are exactly the column widths. Split the gutter as padding on the inner cells: half on the first column’s right, half on the second column’s left (8px + 8px = a 16px gutter). Outlook and every other client then get the same gap. When the columns stack,.column-cellswaps it for a gap below each one. - Padding goes on the
<td>, never on the column<div>. Outlook on Windows ignores padding on a<div>. A card with its own background and padding is a nested table inside the inner cell, as in the example, so the gutter stays outside the card.
Hybrid columns don’t share a height: a card’s background ends where its content ends, so cards with different amounts of text come out uneven. If equal heights matter more than stacking in clients without media-query support, build that row with the Strategy 1 table cells instead (cells in one row always share its height).
For three columns, use three max-width:200px columns (or thirds of your content width) and three ghost cells to match. When the width doesn’t divide evenly, round down and give the remainder to the last column: 520 → 173 + 173 + 174, and the same in the ghost cells. Rounding up wraps the row. Split a 12px gutter as 8px on the first column’s right, 4px on both sides of the middle one, and 8px on the last column’s left, so every column keeps the same content width.
The 600px breakpoint
Section titled “The 600px breakpoint”Email is conventionally designed at 600px wide because:
- Outlook desktop reading panes default to ~575-625px.
- Most webmail apps cap the rendered email at 600-700px even on wide screens.
- Mobile phones in portrait are 320-440px — narrow enough that 600px content needs to scale or stack.
Some templates use 640px or 680px; this is fine as long as you’re consistent. Going wider than 700px usually means horizontal scroll on the reading pane.
Single-column collapse
Section titled “Single-column collapse”The most common responsive change: two side-by-side columns become two stacked rows on mobile.
Via media query (modern clients only)
Section titled “Via media query (modern clients only)”<style> @media only screen and (max-width: 480px) { .stack { display:block !important; width:100% !important; } }</style>
<table width="600"> <tr> <td class="stack" width="300">Column 1</td> <td class="stack" width="300">Column 2</td> </tr></table>Via hybrid pattern (Outlook-safe)
Section titled “Via hybrid pattern (Outlook-safe)”Use the inline-block <div> approach from above, with its rules (font-size:0 wrapper, exact widths, gutter inside the columns). The columns naturally stack when they can no longer sit side-by-side without overflowing.
Mobile-specific styles
Section titled “Mobile-specific styles”When you want to apply styles ONLY on mobile, use a media query targeting your breakpoint:
<style> @media only screen and (max-width: 480px) { /* Bigger touch targets for buttons */ .mobile-button { width:100% !important; max-width:none !important; font-size:16px !important; padding:14px 20px !important; }
/* Larger body text */ .mobile-text { font-size:18px !important; line-height:28px !important; }
/* Tighter spacing */ .mobile-pad-sm { padding:16px !important; } }</style>The !important is required in all of these — without it, inline styles win over <style> block rules.
Hide on mobile / show on mobile
Section titled “Hide on mobile / show on mobile”<style> @media only screen and (max-width: 480px) { .mobile-hidden { display:none !important; } .mobile-only { display:block !important; width:100% !important; height:auto !important; max-height:none !important; visibility:visible !important; overflow:visible !important; } }</style>
<!-- Hidden on mobile --><table class="mobile-hidden"> <tr><td>Desktop-only content</td></tr></table>
<!-- Shown only on mobile --><table class="mobile-only" style="display:none; max-height:0; overflow:hidden;"> <tr><td>Mobile-only content</td></tr></table>The mobile-only block must start with display:none; max-height:0; overflow:hidden; inline — this is the “deep hide” pattern that works across Gmail and Outlook web.
Image scaling
Section titled “Image scaling”Images on responsive emails need max-width:100% in their inline style:
<img src="https://placehold.co/600x300/E0E0E0/E0E0E0/png" width="600" height="auto" alt="..." style="height:auto; display:block; max-width:100%;">The width="600" attribute is what desktop clients use; max-width:100% lets mobile clients shrink it down without overflowing.
For Retina-quality (sharp on high-DPI screens), serve images at 2× the displayed size. A 600px-wide hero should be a 1200px-wide source image, displayed at width 600.
The .stack padding gotcha
Section titled “The .stack padding gotcha”A subtle bug that produces horizontal scroll even when your layout looks correct. The setup looks like this:
<style> @media only screen and (max-width: 600px) { .stack { width:100% !important; display:block !important; } }</style>
<table width="600" style="max-width:600px;width:100%;"> <tr> <!-- Two columns with padding --> <td class="stack" width="50%" style="padding:20px 40px;">Column 1</td> <td class="stack" width="50%" style="padding:20px 40px;">Column 2</td> </tr></table>On mobile, the .stack rule kicks in: each <td> becomes display:block; width:100%. The padding (40px left + 40px right = 80px) is added on top of the 100% width because the default box-sizing is content-box. Result: each stacked <td> is 100% + 80px wide → horizontal scroll.
Two fixes. Pick the right one based on whether you can rely on box-sizing:
Fix 1 — Padding on an inner wrapper (recommended)
Section titled “Fix 1 — Padding on an inner wrapper (recommended)”Move the padding off the cell. Put it on a cell of a nested table inside it:
<style> @media only screen and (max-width: 600px) { .stack { width:100% !important; display:block !important; } }</style>
<table width="600" style="max-width:600px;width:100%;"> <tr> <td class="stack" width="50%" valign="top"> <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td style="padding:20px 40px;">Column 1</td></tr> </table> </td> <td class="stack" width="50%" valign="top"> <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td style="padding:20px 40px;">Column 2</td></tr> </table> </td> </tr></table>Works in every client. The outer cell is fluid; the nested cell carries the padding without inflating the outer cell’s box. Not a <div>: Outlook on Windows ignores padding on a <div>, so the content would sit flush against the edges there. This is the canonical fix.
Fix 2 — calc() to subtract padding from width
Section titled “Fix 2 — calc() to subtract padding from width”If you must keep padding on the cell, subtract it explicitly:
<style> @media only screen and (max-width: 600px) { .stack { width: calc(100% - 80px) !important; display: block !important; } }</style>Brittle — you have to recompute every time padding changes, and calc() is fine in modern clients but inconsistent in older ones. Use Fix 1 when you can.
Test matrix
Section titled “Test matrix”Before sending a responsive email, test on at least:
- Mobile: iPhone Mail (iOS), Gmail iOS, Gmail Android, Outlook iOS
- Desktop webmail: Gmail web (Chrome), Outlook.com (web)
- Desktop apps: Outlook 2019 or 365 (Windows), Apple Mail (Mac)
- Dark mode: Apple Mail dark, Outlook dark, Gmail dark — see Dark Mode for the dark-specific patterns
Litmus and Email on Acid render across this matrix automatically.
Related
Section titled “Related”- Outlook & MSO — the conditional comment pattern that powers hybrid responsive
- Images —
max-width:100%and scaling - Buttons — touch-target sizing for mobile
- Dark Mode —
prefers-color-schemeworks inside@mediablocks