Outlook 2013 中的 HTML 电子邮件宽度问题

标签 html css html-table html-email outlook-2013

我在为 Outlook 2013 设计 HTML 电子邮件时遇到了很多麻烦。在所有其他电子邮件客户端中,表格正确显示(甚至 Outlook Web App),表格和图像的宽度正确。但在 Outlook 2013 中,包括图像在内的整个表格都被压缩了。

下面我发布了我的代码的第一部分。所以我已经用电子邮件内容包装了实际的表格,将所有 CSS 内联并声明了宽度而没有“px”。我不知道还有什么可以尝试。

<!doctype html>
<head>
<meta charset="UTF-8">
<title>HTML Email</title>
</head>
<body bgcolor="#eeeeee" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 20px;">
<table cellpadding="0" cellspacing="0" border="0" align="center"><tr><td width="100%">
    <table border="0" cellpadding="0" cellspacing="0" style="background-color: #ffffff; border-collapse:collapse; mso-table-lspace:0; mso-table-rspace:0; border:0 none; border-radius:0;">
        <tr>
            <td width="596" colspan="2" align="center" valign="middle" style="font-family: Arial, sans-serif; font-size: 11px; color: #000000; padding: 5px;">Click here if this email isn't displayed properly.</td>
        </tr>
        <tr>
            <td width="50%" align="left "><img src="logo.png" width="150" height="48" /></a></td>
            <td width="50%" align="right"><img src="personen.png" width="70" height="70" />&nbsp;<img src="bord.png" width="70" height="70" />&nbsp;<img src="brood.png" width="70" height="70" /></td>
        </tr>
        <tr>
            <td width="596" colspan="2"><img src="visual.png" height="235" width="596" /></td>
        </tr>
        <tr>
            <td width="596" colspan="2" style="padding: 20px;">

最佳答案

Outlook 使用 Word 作为电子邮件编辑器。您可以在 MSDN 中的以下系列文章中阅读有关受支持和不受支持的 HTML 元素、属性和级联样式表属性的信息:

关于Outlook 2013 中的 HTML 电子邮件宽度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28959984/

相关文章:

php - 将 html 页面转换为 pdf

javascript - 如何获取 <td> 内的跨度值(表数据),当单击也在 <td> 内的按钮时

html - 我的粘性页脚不起作用

html - 当鼠标向下滚动时移动搜索框并将其固定到标题中,当移动向上滚动时将其带回

jqGrid 将 colspan 应用于列标题

javascript - 覆盖 API CSS REACT

Javascript 在 IE 中不工作

html - 水平空间中的 2 个 div

html - Flex nowrap 容器不包裹 child 。当它们的宽度以百分比形式提及时

javascript - 如何正确应用KO绑定(bind)下面的例子