> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lettr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Email Content Rendering Issues

> Diagnose and fix broken layouts, missing images, font fallbacks, and clipped messages across email clients.

Email clients render HTML differently — there is no universal standard like there is for web browsers. Layouts that look perfect in Gmail can break completely in Outlook, and vice versa. This guide covers the most common rendering problems and how to fix them.

***

## The Rendering Landscape

Each email client uses a different rendering engine, which means different levels of CSS and HTML support:

| Client | Rendering Engine | CSS Support |
| - | - | - |
| **Gmail (web)** | Custom (rewrites class names, drops invalid CSS) | Moderate: supports `<style>` in `<head>` and media queries, but discards a whole `<style>` block if it contains an error |
| **Gmail (mobile app)** | WebKit | Moderate: supports media queries for Gmail accounts, but strips `<style>` for non-Gmail accounts added to the app |
| **Outlook 2019/2021/365 (desktop)** | Microsoft Word | Very limited: no `background-image`, broken `float`, poor `margin`/`padding` |
| **Outlook.com (web)** | Custom | Moderate: better than desktop Outlook |
| **Apple Mail** | WebKit | Excellent: closest to a web browser |
| **Yahoo Mail** | Custom | Moderate: strips some CSS properties |
| **Thunderbird** | Gecko | Good: similar to Firefox |

> [!WARNING]
>
> Outlook desktop's use of the Word rendering engine is the single biggest source of email rendering problems. If you design for Outlook first, other clients will generally work. The reverse is not true.

***

## Broken Layouts

### Tables vs CSS Layout

Modern web development uses CSS Grid and Flexbox, but email requires **table-based layouts** for consistent rendering across clients — especially Outlook desktop.

```html theme={null}
<!-- Good: Table-based layout works everywhere -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td width="50%" valign="top" style="padding: 10px;">
      Left column content
    </td>
    <td width="50%" valign="top" style="padding: 10px;">
      Right column content
    </td>
  </tr>
</table>

<!-- Bad: CSS layout breaks in Outlook desktop -->
<div style="display: flex; gap: 20px;">
  <div style="flex: 1;">Left column content</div>
  <div style="flex: 1;">Right column content</div>
</div>
```

### Common Layout Breakages

> [accordion] Columns stacking or overlapping in Outlook
>
> Outlook desktop ignores `display: flex`, `display: grid`, and `float` in many contexts.
>
> **Fix:** Use `<table>` elements with explicit `width` attributes (in pixels or percentages) for column layouts. Set `role="presentation"` on layout tables for accessibility.

> [accordion] Email is wider than expected
>
> Missing width constraints cause the email to stretch to the full viewport.
>
> **Fix:** Wrap your entire email in a container table with a fixed `max-width`:
>
> ```html theme={null}
> <table role="presentation" width="100%" cellpadding="0" cellspacing="0">
>   <tr>
>     <td align="center">
>       <table role="presentation" width="600" cellpadding="0" cellspacing="0"
>              style="max-width: 600px; width: 100%;">
>         <tr>
>           <td>
>             <!-- Email content here -->
>           </td>
>         </tr>
>       </table>
>     </td>
>   </tr>
> </table>
> ```

> [accordion] Spacing is inconsistent across clients
>
> Different clients handle `margin` and `padding` differently, especially on `<p>` and `<div>` elements.
>
> **Fix:** Use `padding` on `<td>` elements instead of `margin` on block elements. Reset default margins on `<p>` tags:
>
> ```html theme={null}
> <p style="margin: 0 0 16px 0;">Paragraph text</p>
> ```

> [accordion] A button shows as a thin bar, or a link isn't clickable
>
> The button label is visible but the button has collapsed into a thin colored line and nothing happens when you click it — while other buttons in the same email work. This is not a client rendering quirk: the link's address is invalid, so the email client removed the link, and the button's padding and background went with it.
>
> The usual cause is a merge tag used as the link's **entire** URL, such as `href="{{LOBBY_URL}}"`. Values inserted into links are URL-encoded at send time, so a full address arrives as `https%3A%2F%2F…`, which no client treats as a link. The editor preview doesn't reveal this, because it isn't rendered by the sending pipeline.
>
> **Fix:** Keep `https://` and the fixed part of the address in the template, and use a merge tag only for the variable part — `https://app.example.com/lobby/{{LOBBY_ID}}`. See [Links and URLs](https://docs.lettr.com/learn/templates/template-language.md#links-and-urls).
>
> If the URL is already built that way, the merge tag value was probably missing: a tag that isn't supplied, or whose name differs in capitalization from the key in `substitution_data`, renders as empty text.

> [accordion] A change I made in the editor is missing from the sent email
>
> You added or changed something, it shows in the editor and its preview, but the email your application sends doesn't have it. Saving a template creates a new **inactive** version; API sends keep using the published version until you publish the new one.
>
> **Fix:** Open the template, click **See versions**, and choose **Publish** on the version you saved. See [Saving vs. Publishing](https://docs.lettr.com/learn/templates/versions.md#saving-vs-publishing).

> [accordion] Responsive design not working in Gmail web
>
> Gmail supports `<style>` blocks in the `<head>` and media queries, but it discards the entire block if it finds a CSS error, if the block exceeds Gmail's size limit, or when the message is opened in the Gmail app from a non-Gmail account. Any of these removes your media queries.
>
> **Fix:** Use inline styles as the default (mobile-first) and rely on media queries only as a progressive enhancement for clients that support them. Design your single-column mobile layout as the base.

***

## Missing or Broken Images

### Common Causes

| Problem | Cause | Fix |
| - | - | - |
| Images not loading | Blocked by client (Outlook blocks by default) | Always include `alt` text as a fallback |
| Broken image icon | Incorrect `src` URL or expired link | Use absolute URLs hosted on a reliable CDN |
| Images clipped or distorted | Missing `width`/`height` attributes | Always set both `width` and `height` on `<img>` tags |
| Retina images blurry | Image served at 1x resolution | Use 2x resolution images with explicit `width`/`height` at the display size |
| CID images not displaying | Inline attachments not supported by all clients | Use hosted URLs instead of CID references |

### Best Practices for Email Images

```html theme={null}
<!-- Good: Complete image tag with fallbacks -->
<img
  src="https://storage.yourdomain.com/logo.png"
  alt="Your Company Logo"
  width="200"
  height="50"
  style="display: block; border: 0; outline: none; max-width: 100%; height: auto;"
/>

<!-- Bad: Missing dimensions and alt text -->
<img src="https://storage.yourdomain.com/logo.png" />
```

> [!TIP]
>
> Use Lettr's [Email Storage](https://docs.lettr.com/learn/domains/storage-domains.md) to host email images on your own domain. This improves load speed and avoids images being blocked by URL reputation filters.

### Images Blocked by Default

Some email clients block images by default until the recipient clicks "Load images":

* **Outlook desktop** — blocks external images by default
* **Thunderbird** — blocks remote content by default
* **Some corporate email systems** — strip or block images for security

Design your emails to be readable without images. Use descriptive `alt` text, background colors as fallbacks, and ensure key information is in HTML text, not baked into images.

***

## Font Rendering Issues

Email clients have very limited web font support. Most clients fall back to system fonts.

### Web Font Support

| Client | Web Fonts (`@font-face`) |
| - | - |
| Apple Mail | Supported |
| iOS Mail | Supported |
| Outlook (all versions) | Not supported |
| Gmail (web and app) | Not supported |
| Yahoo Mail | Not supported |
| Thunderbird | Supported |

### Font Fallback Stack

Always define a fallback stack. Your web font (if used) should be first, followed by system fonts:

```html theme={null}
<p style="font-family: 'Your Web Font', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;">
  This text will render in the first available font.
</p>
```

> [!NOTE]
>
> Since most recipients will see a system font, design and test with system fonts as the primary experience. Treat web fonts as a progressive enhancement.

***

## Gmail Message Clipping

Gmail clips (truncates) emails that exceed approximately **102 KB** of HTML content. When clipped, Gmail shows a "\[Message clipped] View entire message" link at the bottom.

### Why Clipping Matters

* Recipients may miss important content below the fold (like unsubscribe links)
* The "View entire message" link opens the email in a new window, which many recipients won't click
* Tracking pixels placed at the bottom of clipped emails won't fire, reducing open rate accuracy

### How to Avoid Clipping

1. **Minimize HTML size** — remove unnecessary whitespace, comments, and redundant inline styles.
2. **Avoid duplicated CSS** — some email builders inline the same styles on every element, inflating file size.
3. **Use efficient markup** — simplify nested tables and remove empty elements.
4. **Check the size before sending** — your HTML should be well under 102 KB.

```bash theme={null}
# Check your email HTML file size
wc -c < email-template.html
# If the output exceeds ~100000, you need to optimize
```

> [!TIP]
>
> Ask [Adamko](https://docs.lettr.com/learn/ai-assistant/content-creation.md#template-review) to *review* a template and he warns you when its HTML is over Gmail's 102 KB clipping limit. If your template approaches 80 KB, start optimizing before it reaches the limit.

***

## Dark Mode Rendering

Dark mode inverts colors in email clients, which can break designs that aren't prepared for it. See [Dark Mode Email Design](https://docs.lettr.com/knowledge-base/best-practices/dark-mode-design.md) for a dedicated guide on this topic.

### Quick Fixes

* Add `color-scheme: light dark;` and `-webkit-color-scheme: light dark;` to your email's root element to signal dark mode awareness.
* Use transparent PNGs for logos instead of JPGs with white backgrounds.
* Avoid pure white (`#ffffff`) backgrounds — use a very slight off-white (`#fefefe`) that won't get inverted.

***

## Testing Across Clients

There is no substitute for testing your emails in multiple clients before sending.

### Manual Testing Checklist

> [accordion] Test in the major clients
>
> At minimum, test in:
>
> * Gmail (web and mobile)
> * Outlook desktop (2019/2021/365)
> * Outlook.com (web)
> * Apple Mail (macOS and iOS)
>
> These four cover the vast majority of recipients. Add Yahoo Mail if a significant portion of your audience uses it.

> [accordion] Test with images on and off
>
> View your email with images loaded and with images blocked. Verify that alt text displays properly and the email is still readable.

> [accordion] Test at different widths
>
> View your email at desktop (600px content width) and mobile (320px viewport) sizes. Verify that responsive breakpoints work correctly.

> [accordion] Test in dark mode
>
> Toggle dark mode in Gmail, Outlook, and Apple Mail. Check for invisible text, missing logos, and broken backgrounds.

> [accordion] Check the HTML file size
>
> Verify the compiled HTML is under 80 KB to avoid Gmail clipping. Check for unnecessary inline styles or deeply nested tables inflating the size.

> [accordion] Validate links and tracking
>
> Click every link in the email. Verify tracking links resolve correctly and don't trigger browser security warnings.

***

## Related Topics

> [card] [Templates](https://docs.lettr.com/learn/templates/introduction.md)
>
> Build and manage email templates with the Topol editor

> [card] [Dark Mode Email Design](https://docs.lettr.com/knowledge-base/best-practices/dark-mode-design.md)
>
> Defensive CSS strategies for dark mode rendering.

> [card] [Email Accessibility](https://docs.lettr.com/knowledge-base/best-practices/email-accessibility.md)
>
> Alt text, semantic HTML, and screen reader compatibility.

> [card] [Email Content Types](https://docs.lettr.com/knowledge-base/fundamentals/content-types.md)
>
> HTML, plain text, and AMP email explained.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.