You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows 10 Mail无法渲染max-width问题求助(附邮件模板代码)

Fixing max-width Compatibility with Windows 10 Mail

Windows 10 Mail relies on the Word rendering engine, which has notoriously spotty support for modern CSS properties like max-width. Let’s walk through a few reliable fixes tailored to this stubborn client:

1. Use Conditional Comments for Targeted Widths

Windows 10 Mail recognizes Microsoft Office (MSO) conditional comments, so we can serve a fixed width specifically to it while keeping max-width for other clients:

<!--[if mso]>
<td width="110" style="text-align: center;padding: 10px;margin: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;font-size: 100%;line-height: 1.6">
<![endif]-->
<!--[if !mso]><!-->
<td style="max-width: 110px;text-align: center;padding: 10px;margin: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;font-size: 100%;line-height: 1.6">
<!--<![endif]-->

The [if mso] block feeds a hardcoded width to Windows 10 Mail, while the non-MSO block retains the fluid max-width for clients that support it.

2. Add a Native width Attribute to Images

Windows 10 Mail often ignores max-width on images when it’s only in the style attribute. Pair it with a native width attribute to enforce the limit in this client:

<img width="110" style="max-width: 110px;margin: 0;padding: 0;..." alt="Your Image Description">

The native width locks the size for Windows 10 Mail, while max-width ensures the image scales down on smaller screens in other email clients.

3. Nest Your Content in a Fixed-Width Table

If the above methods don’t work, wrap your content in an outer table with a fixed width—tables are the most reliable layout tool for legacy email clients like Windows 10 Mail:

<table width="110" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td style="text-align: center;padding: 10px;margin: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;font-size: 100%;line-height: 1.6">
      <img style="max-width: 110px;margin: 0;padding: 0;..." alt="Your Image Description">
    </td>
  </tr>
</table>

The outer table’s width property will force Windows 10 Mail to respect the 110px limit, while your inner styles still work for modern clients.

All these approaches work around the Word engine’s limitations—since it prioritizes old-school HTML attributes over CSS, leaning into fixed widths and conditional logic is the way to go.

内容的提问来源于stack exchange,提问作者magicianiam

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 07:44:59