Skip to main content
CSS Properties

margin

CSS property · 6 supported, 9 partial, 0 unsupported across 15 clients

margin controls external spacing around block-level elements and is notably less reliable in email than padding. Outlook on Windows ignores margin on most elements, so production email layouts typically substitute margin with padded <td> cells. Modern clients honor margin correctly, but the lowest-common-denominator approach is to avoid it entirely for structural spacing.

Client Support

ClientCategoryEngineSupport
GmailwebmailGmail WebPartial
Gmail AndroidmobileGmail MobilePartial
Gmail iOSmobileGmail MobilePartial
Outlook 365webmailOutlook WebPartial
Outlook (New)desktopOutlook WebPartial
Outlook ClassicdesktopMicrosoft WordPartial
Outlook iOSmobileOutlook MobilePartial
Outlook AndroidmobileOutlook MobilePartial
Apple MaildesktopWebKitSupported
Apple Mail iOSmobileWebKitSupported
Yahoo MailwebmailYahooPartial
Samsung MailmobileSamsungSupported
ThunderbirddesktopGeckoSupported
HEY MailwebmailWebKitSupported
SuperhumandesktopBlinkSupported

Client-by-client behaviour for margin

Fully supports margin (6): Apple Mail, Apple Mail iOS, Samsung Mail, Thunderbird, HEY Mail, Superhuman.

Partial support (9): Gmail, Gmail Android, Gmail iOS, Outlook 365, Outlook (New), Outlook Classic, Outlook iOS, Outlook Android, Yahoo Mail. Expect rendering quirks unique to each engine — partial support typically means a subset of values, an ignored shorthand, or sanitizer-specific rewrites.

When to use margin in email

  • Centering an outer table by setting margin: 0 auto on the table element when targeting modern clients only.
  • Adding small gaps between inline-block elements in mobile-first templates.
  • Resetting default margins on block elements like <p>, <h1>, and <ul> via inline overrides.

Rendering behaviour and edge cases

  • Outlook on Windows ignores margin on table elements, breaking centering tricks unless you use align="center" and a fixed width.
  • Gmail strips negative margin values entirely, making margin-based off-canvas tricks unreliable.
  • Some clients add extra default margin on <p> tags — explicitly set margin: 0 on every paragraph that needs predictable spacing.

Recommended fallback strategy

Replace structural margin with padded table cells for cross-client consistency. Use margin only for resetting browser defaults on block elements, and always set explicit margin: 0 on <p>, <h1>–<h6>, and <ul> to prevent client-default spacing from pushing your layout.

Fixes & Workarounds

Gmail

Partial

"margin" is not supported in this email client.

Gmail Android

Partial

"margin" is not supported in this email client.

Gmail iOS

Partial

"margin" is not supported in this email client.

Outlook 365

Partial

"margin" is not supported in this email client.

Outlook (New)

Partial

"margin" is not supported in this email client.

Outlook Classic

Partial

"margin" is not supported in this email client.

Outlook iOS

Partial

"margin" is not supported in this email client.

Outlook Android

Partial

"margin" is not supported in this email client.

Yahoo Mail

Partial

"margin" is not supported in this email client.

Related Features

Test your email across all 15 clients

Preview rendering, catch CSS issues, and get actionable fixes — free.

Try Emailens Free

Support data last updated Apr 27, 2026 · synced from caniemail.com via @emailens/engine.