Developer Guide

Outlook Email CSS Compatibility Guide for 2026

A complete reference for what CSS works in Outlook, what breaks, and how to fix it. Covers Outlook Desktop (Word engine), Outlook (new), conditional comments, VML fallbacks, dark mode, and tested code solutions for every common rendering issue.

Last updated: March 2026

Why Outlook Renders Email Differently

Most email clients use a browser-based rendering engine. Gmail uses a custom HTML sanitizer on top of Chrome. Apple Mail uses WebKit. Yahoo uses its own sanitizer. These engines have CSS quirks, but they fundamentally understand modern CSS.

Outlook Desktop (2007-2024) is different. Microsoft switched its HTML rendering engine from Internet Explorer to Microsoft Word in 2007. That decision, made nearly two decades ago, is the root cause of almost every Outlook email rendering issue you will encounter. Word's HTML renderer was designed for document layout, not web pages. It supports a subset of CSS 2.1 and ignores virtually all CSS3 properties.

The two Outlooks you need to know

Outlook Desktop (Classic)

Uses the Word rendering engine. Outlook 2007, 2010, 2013, 2016, 2019, 2021, and Microsoft 365 classic desktop all use this engine. This is the problematic one. It strips border-radius, background-image, max-width, flexbox, grid, and more.

Outlook (new) / Outlook.com

Uses a modern web-based rendering engine. Supports most CSS properties including border-radius, background-image, flexbox, and max-width. Microsoft is migrating users to this version, but the classic desktop client is still widely used in enterprise environments.

Complete CSS Property Support Table

This table shows CSS support across the five major email clients. Data sourced from caniemail.com and the Email QA Tool compatibility engine. Focus on the Outlook Desktop column — that is where most rendering issues originate.

CSS PropertyOutlook DesktopOutlook (new)GmailApple MailYahoo Mail
background-color
background-image
border
border-radius
box-shadow
color
display
float
font-family
font-size
font-style
font-weight
height
letter-spacing
line-height
margin
max-width
opacity
overflow
padding
position
text-align
text-decoration
text-transform
vertical-align
width
flexbox
grid
gap
transform
transition
animation
object-fit
Supported Partial Not supported

Common Outlook Rendering Issues with Fixes

Each issue below includes the root cause, the Outlook behavior, and a tested fix you can copy into your email HTML.

max-width is ignored — content goes full width

Layout-breaking

Outlook Desktop ignores max-width entirely. If your email layout depends on max-width to constrain a container, Outlook will render it at full width (typically 100% of the viewport), breaking your layout.

Fix: Use a fixed-width table as the outer container. Set the width attribute on the table element, not just CSS.

<!-- Works in all clients including Outlook Desktop -->
<table role="presentation" width="600" cellpadding="0"
       cellspacing="0" border="0"
       style="max-width:600px; width:100%;">
  <tr>
    <td style="padding: 20px;">
      Your email content here
    </td>
  </tr>
</table>

background-image is stripped — shows solid color or nothing

Layout-breaking

Outlook Desktop does not support CSS background-image on any element. Your carefully crafted hero section with a background image will show a blank area or just the background-color fallback.

Fix: Use VML (Vector Markup Language) inside Outlook conditional comments. The VML fill element renders a background image in Word's engine.

<!--[if mso]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml"
        fill="true" stroke="false"
        style="width:600px; height:300px;">
  <v:fill type="frame"
          src="https://example.com/hero-bg.jpg"
          color="#1a1a2e" />
  <v:textbox inset="0,0,0,0">
<![endif]-->

<div style="background-image: url('https://example.com/hero-bg.jpg');
            background-color: #1a1a2e;
            background-size: cover;
            max-width: 600px;
            height: 300px;">
  <p style="color: #ffffff; padding: 40px;">
    Hero text content here
  </p>
</div>

<!--[if mso]>
  </v:textbox>
</v:rect>
<![endif]-->

border-radius renders as square corners

Cosmetic

Outlook Desktop ignores border-radius on all elements. Rounded buttons, rounded image containers, and pill-shaped badges all render with sharp 90-degree corners.

Fix: For CTA buttons specifically, use VML v:roundrect to render rounded corners in Outlook. Other clients use the standard CSS.

<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml"
             xmlns:w="urn:schemas-microsoft-com:office:word"
             href="https://example.com/cta"
             style="height:44px; v-text-anchor:middle; width:200px;"
             arcsize="14%"
             strokecolor="#0066cc"
             fillcolor="#0066cc">
  <w:anchorlock/>
  <center style="color:#ffffff; font-family:Arial,sans-serif;
                  font-size:14px; font-weight:bold;">
    Shop Now
  </center>
</v:roundrect>
<![endif]-->

<!--[if !mso]><!-->
<a href="https://example.com/cta"
   style="display:inline-block; background:#0066cc;
          color:#ffffff; font-family:Arial,sans-serif;
          font-size:14px; font-weight:bold;
          text-decoration:none; padding:12px 32px;
          border-radius:6px;">
  Shop Now
</a>
<!--<![endif]-->

flexbox and grid layouts collapse entirely

Layout-breaking

Outlook Desktop does not support display:flex or display:grid. Elements using these layouts will stack vertically or render in an unpredictable order, breaking multi-column designs.

Fix: Use table-based layouts for any multi-column structure. Tables are universally supported across all email clients including Outlook Desktop.

<!-- Instead of flexbox/grid, use tables for columns -->
<table role="presentation" width="600" cellpadding="0"
       cellspacing="0" border="0">
  <tr>
    <!-- Left column -->
    <td width="290" valign="top" style="padding-right:10px;">
      <p>Column 1 content</p>
    </td>
    <!-- Right column -->
    <td width="290" valign="top" style="padding-left:10px;">
      <p>Column 2 content</p>
    </td>
  </tr>
</table>

<!-- For responsive stacking on mobile, add: -->
<!--
@media screen and (max-width: 600px) {
  td[class="column"] {
    display: block !important;
    width: 100% !important;
  }
}
-->

margin and padding behave inconsistently

Layout-breaking

Outlook Desktop has partial support for margin and padding. Margin on block-level elements (like divs and paragraphs) is unreliable. Padding works on table cells but can behave unexpectedly on other elements. Negative margins are ignored entirely.

Fix: Use padding on table cells instead of margins. For spacing between sections, use empty table rows with a fixed height.

<!-- Reliable spacing in Outlook -->
<table role="presentation" width="600" cellpadding="0"
       cellspacing="0" border="0">
  <tr>
    <td style="padding: 20px 30px;">
      Content with padding (works in Outlook)
    </td>
  </tr>

  <!-- Spacer row instead of margin -->
  <tr>
    <td height="20" style="font-size:0; line-height:0;">
      &nbsp;
    </td>
  </tr>

  <tr>
    <td style="padding: 20px 30px;">
      Next section
    </td>
  </tr>
</table>

display:none quirks — hidden content may still show

Cosmetic

Outlook Desktop has partial support for the display property. Using display:none in a style block may not reliably hide elements. Outlook can also ignore display:none inside media queries, which breaks the common pattern of hiding content on desktop versus mobile.

Fix: Use inline display:none or a combination of mso-hide:all, overflow:hidden, and zero-height techniques for Outlook.

<!-- Method 1: Inline style (most reliable) -->
<div style="display:none; mso-hide:all; max-height:0;
            overflow:hidden; font-size:0; line-height:0;">
  Hidden preheader text goes here
</div>

<!-- Method 2: Outlook-specific hiding -->
<!--[if !mso]><!-->
<div style="display:none;">
  Content hidden from non-Outlook clients
</div>
<!--<![endif]-->

<!-- Method 3: Show only in Outlook -->
<!--[if mso]>
<p>This content is only visible in Outlook Desktop</p>
<![endif]-->

Outlook Conditional Comments Explained

Outlook conditional comments let you include HTML and VML that only Outlook Desktop renders. Other email clients treat these as standard HTML comments and ignore them. This is the primary mechanism for providing Outlook-specific fallbacks without affecting other clients.

Target Outlook Desktop only

Content inside this block is rendered only by Outlook Desktop (Word engine). All other clients skip it.

<!--[if mso]>
  <p>Only Outlook Desktop sees this</p>
<![endif]-->

Target everything except Outlook Desktop

Content inside this block is hidden from Outlook Desktop. Gmail, Apple Mail, Yahoo, and Outlook (new) all render it.

<!--[if !mso]><!-->
  <p>Everything except Outlook Desktop sees this</p>
<!--<![endif]-->

Target specific Outlook versions

You can target specific Outlook versions using version numbers. Outlook 2007 = 12, 2010 = 14, 2013 = 15, 2016/2019/365 = 16.

<!--[if gte mso 16]>
  <p>Outlook 2016 and newer only</p>
<![endif]-->

<!--[if lte mso 14]>
  <p>Outlook 2010 and older only</p>
<![endif]-->

Provide Outlook and non-Outlook versions

Combine both patterns to serve completely different HTML to Outlook Desktop versus all other clients.

<!--[if mso]>
  <table width="600"><tr><td>
<![endif]-->

<div style="max-width:600px;">
  Content here
</div>

<!--[if mso]>
  </td></tr></table>
<![endif]-->

Dark Mode in Outlook

Outlook Desktop and Outlook (new) both support dark mode, but they handle it differently. Understanding these differences prevents your email from becoming unreadable when users have dark mode enabled.

Outlook Desktop Dark Mode

Outlook Desktop inverts light backgrounds to dark and dark text to light automatically. It uses its own algorithm, not prefers-color-scheme. Hardcoded background-color: #ffffff will be inverted to a dark color. color: #000000 will be inverted to light text. This generally works, but it can break branded colors and make logos on transparent backgrounds invisible.

Outlook (new) Dark Mode

Outlook (new) respects the prefers-color-scheme media query. You can provide explicit dark mode styles using a standard CSS media query, just like you would for a website.

Defensive coding for both

  • Avoid hardcoded white backgrounds (#ffffff) and black text (#000000). Use slightly off-white (#f7f7f7) and dark gray (#222222) instead — Outlook's inverter is less aggressive with non-pure colors.
  • Add a thin border or background to logos so they remain visible on inverted backgrounds.
  • Use the [data-ogsc] and [data-ogsb] attribute selectors to override Outlook's dark mode transformations on specific elements.
  • Provide a @media (prefers-color-scheme: dark) block for Outlook (new) and Apple Mail.

Dark mode override example

<style>
  /* Dark mode for Outlook (new) and Apple Mail */
  @media (prefers-color-scheme: dark) {
    .email-body { background-color: #1a1a1a !important; }
    .text-primary { color: #e0e0e0 !important; }
    .logo-wrapper { background-color: #ffffff !important; }
  }

  /* Outlook Desktop dark mode override */
  [data-ogsc] .text-primary { color: #e0e0e0 !important; }
  [data-ogsb] .email-body { background-color: #1a1a1a !important; }
</style>

Gmail Clipping and Outlook: A Combined Problem

While not an Outlook-specific issue, Gmail clips emails larger than 102KB, hiding everything after the cutoff behind a “View entire message” link. VML code and Outlook conditional comments add significant weight to your HTML. A hero section with a VML background image fallback can add 1-2KB of extra markup per instance.

The risk is that your Outlook fallback code pushes the total HTML size past Gmail's clipping threshold. Your email renders perfectly in Outlook but gets clipped in Gmail.

How to manage HTML weight

  • Inline only the CSS properties that matter. Remove any CSS that is not used in the email.
  • Minify your HTML before sending. Remove comments (except conditional comments), extra whitespace, and unnecessary attributes.
  • Limit VML fallbacks to essential elements (hero images, CTA buttons). Not every rounded corner needs a VML solution.
  • Monitor your total HTML size. Email QA Tool flags files over 90KB as a warning and over 102KB as a failure.
  • Test with Gmail after adding Outlook fallbacks, not before.

Testing Your Email in Outlook

There are three layers to Outlook compatibility testing, and each catches different types of issues.

1

Automated CSS compatibility analysis

Tools like Email QA Tool scan your HTML for CSS properties that Outlook Desktop does not support and flag them with specific fix suggestions. This catches structural issues (flexbox layouts, missing width fallbacks, unsupported properties) before you send a single test email. Fast and repeatable.

2

Rendering previews across Outlook versions

Services like Litmus and Email on Acid send your email through actual Outlook instances and return screenshots. This catches visual issues that rule-based analysis cannot detect — spacing inconsistencies, unexpected line wrapping, image scaling problems.

3

Manual send testing

Send test emails to actual Outlook accounts — both classic desktop and Outlook (new). Check dark mode rendering by toggling the setting. This is the final verification step and catches issues that neither automated analysis nor screenshot previews surface.

Quick Reference: What Outlook Desktop Does Not Support

A condensed list of CSS properties that are fully unsupported (not rendered at all) in Outlook Desktop. If your email uses any of these, you need a fallback or an alternative approach.

background-image
border-radius
box-shadow
float
max-width
opacity
overflow
position
flexbox
grid
gap
transform
transition
animation
object-fit

Properties with partial support (border, display, height, line-height, margin, padding) work in some contexts but not others. For example, padding works on <td> elements but not reliably on <div> or <p> elements.

Catch Outlook issues before you send

Email QA Tool scans your email HTML against the same compatibility data from this guide and flags every unsupported CSS property with the specific client, severity, line number, and a suggested fix. Upload your HTML and get a full Outlook compatibility report in seconds.

Free trial includes 5 emails with all checks. No account required to start.

Related