
Most “CSS will not work in email” bugs are known client limits. You fix them by changing the HTML pattern, not by adding another framework.
Walk through the failure, the usual cause, and a repair that survives testing. Prevention lives in best practices. Preview first with the HTML email preview.
Direct answer
| Symptom | First suspect | Repair |
|---|---|---|
| Layout exploded in Outlook Desktop | Flex/grid or margin-based columns | Tables + width attributes |
| Huge blank gap | Uncollapsed tables, leftover padding, Outlook line-height | border-collapse, reset p margins |
| Message ends with “View entire message” | HTML > ~102KB in Gmail | Cut CSS/comments, inline leanly |
| Columns squeezed not stacked | Media queries ignored | Default stacked tables |
| White text vanished | Dark mode inversion | Transparent-safe logos, explicit backgrounds |
| Button not clickable | Image-only CTA or Outlook padding | Linked table cell with text |
| Fonts ignored | Web fonts | System font stack inline |
Outlook Desktop (Windows) still uses Word
This is the source of half the folklore.
Does not work as on the web: max-width alone, display:flex, gap, float in many cases, background images on arbitrary divs, padding on <a> as the only button.
Does work: tables, width/height attributes, inline padding on td, bgcolor as well as CSS background, conditional comments for extra markup.
Fixes:
- Put
width="600"on the inner table, not only CSS - Images:
widthandheightattributes - For buttons, a
tdwith padding and an<a>inside, both with colors - If you need a rounded image button in Outlook, accept a rectangle or add VML (and then test VML)
Never debug Outlook by refreshing Chrome.
Gmail clips and strips
Clipping: When HTML is large, Gmail hides the rest behind a link. Recipients often do not click. Count bytes after inlining. Remove unused modules, bloated CSS resets, and base64 images.
Style stripping: Gmail supports a subset of <style>. Classes may work in web Gmail and fail elsewhere. Inline the layout.
Android Gmail: Nested tables with widths in px can overflow. Prefer fluid inner content with a max.
Account types: Consumer Gmail and Google Workspace can differ slightly. Test the one your readers use.
Columns will not stack
If stacking depends on @media (max-width: 600px) { .col { display:block !important; } }, many clients ignore you.
More reliable:
- One column design
- Or two tables that are
display:inline-blockwith a width that wraps (hybrid) if you test - Or send a mobile-first single column always
Product grids of four on mobile are a rendering issue you should not try to win.
Images break the layout
Causes:
- No dimensions → the table jumps when images load
- Retina image 2000px wide without attributes → Outlook shows a banner the size of a wall
- PNG with huge alpha on a dark client
- SVG as
img src— weak support; prefer PNG/JPEG/GIF - Hotlinked file from a site that blocks mail fetchers
Fixes: exact attributes, compressed assets, alt text, host on a CDN that allows Gmail’s cache.
Dark mode made it unreadable
Clients invert or remap colors.
Patterns that fail:
- Black text with no background set, on a white table that becomes dark
- Logo PNG with baked dark background
- Gray footer on gray inversion
- Border-only buttons that disappear
Patterns that help:
- Set
background-coloron the cells that hold text - Logos on transparent backgrounds, or provide a dark-mode variant in
<style>for clients that honor it - Buttons with both background and text color inlined
Preview dark appearance as a hint, then check Apple Mail and Outlook.com.
Buttons and links
Whole row not clickable. The <a> only wraps three words. In mobile that is a tiny target. Pad the td and make the link display:block where supported.
Outlook ignores padding on <a>. Pad the cell.
Link color inherited wrong. Inline color on the <a>.
Tracking wrapper breaks URL. Test the ESP-sent link, not the pre-send href. UTM construction: UTM builder.
Spacing, lines, and phantom gaps
- Default
<p>margins in Outlook: setmargin:0inline line-heightas a unitless number can help; huge px line-heights create gaps- Images as
display:blockto remove the inline-gap under GIFs border-collapse:collapseon tables- Avoid extra
<br>plus padding
If a 40px gap appears only after ESP inlining, inspect the inlined HTML. Some platforms inject wrappers.
Custom fonts never showed up
Web fonts work in some Apple Mail versions and almost nowhere else. Always specify a fallback stack:
font-family: Georgia, 'Times New Roman', serif
Brand type in headlines as an image is a trade: looks right, worse accessibility, worse when images are blocked. Use sparingly.
Preheader and hidden text
Hidden preheader techniques (font-size:0; display:none) leak into the body in some clients or get ignored so the preheader becomes “Logofacebooktwitter”. Put a real sentence in a visible-or-standard preview-text node your ESP documents.
Do not hide blocks of extra keywords. That is a spam-era trick and a rendering mess.
A debug order that saves time
- Reproduce on the received message.
- Name the client and OS.
- Simplify: one table, one image, one button. If that works, re-add modules.
- Check inlined HTML for missing tags in a segment.
- Check size for Gmail clip.
- Check Outlook separately from Gmail.
Do not “add !important everywhere” as step 1.
ESP wrappers you did not write
Many platforms wrap your HTML in their own table, add a preheader node, and inject a tracking pixel at the bottom. Bugs that “only happen in sent mail” often live there.
Inspect the received source and search for the wrapper class names. If the wrapper sets width=100% inside another 100% table with padding, you get unexpected squeeze. Some platforms let you disable the wrapper on custom HTML campaigns. Use that when you own the template.
Link wrapping can also break already-long URLs or add http:// tracking domains that look untrusted. Preview the wrapped URL. If it is five redirects, talk to the vendor before you blame Outlook.
Pixels at the bottom can add 1px gaps or “unknown image” icons. Harmless unless your footer was pixel-perfect. Do not chase 1px after a wrapper you cannot remove.
FAQ
Why did a layout break for one segment only? Conditional template tags dropped a </td>. Diff the rendered HTML per segment.
Are web fonts the reason Outlook looks different? Secondary. Tables and padding are first.
Gmail shows a blank hero. Images blocked or a zero-size table. Check alt and dimensions.
Can we fix Outlook with more !important? No. Change the markup.
Is this a deliverability issue? Only if the message also failed auth or landed in junk. Rendering QA is separate.