英文:
Outlook Disclaimer HTML
问题
以下是翻译好的部分:
我正在尝试为外部消息制作免责声明。但我在Outlook中的HTML渲染方面遇到了问题。通过w3schools进行测试时,它看起来很好,如下所示:
然而,在Outlook中看起来像这样:
这是我正在使用的代码:
英文:
I am trying to make a disclaimer for external messages. I am having trouble with how Outlook is rendering the HTML though. Testing it via w3schools, it appears fine, as shown here:
Though, in Outlook it looks like this:
Here is the code I am using:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<div style="background-color:#6385ce; border:3.5px solid #1e3679; padding:.5em; ">
<span style="font-size:12pt; font-family: 'Cambria','times new roman','garamond',serif; color:#FFFFFF;"><b>CAUTION:</b></span>
<span style="font-size:10pt; font-family: 'Cambria','times roman',serif; color:#FFFFFF">This email originated from outside. Do not click on links, open attachments, or reply unless you recognize the sender as well as the domain. Follow guidelines for validating payment information with Wires, ACH, etc.
</span>
</div>
<!-- end snippet -->
Any idea what I can do to fix this? I have been messing with different styles but can't seem to get it to work in outlook.
答案1
得分: 0
表格标签在Outlook中比div
更安全。
而且有一些Outlook规则使用整数、一个字体系列等等。
<table style="background:#6385ce; border:4px solid #1e3679; color:#fff; font-family: Cambria; font-size:10pt;">
<tbody>
<tr>
<td style="padding:8px;">
<strong style="font-size:12pt;">CAUTION:</strong> This email originated from outside. Do not click on links, open attachments, or reply unless you recognize the sender as well as the domain. Follow guidelines for validating payment information with Wires, ACH, etc.
</td>
</tr>
</tbody>
</table>
英文:
Table tag is more safe than div in outlook.
and there's some outlook rule that use whole number, one font famly... etc.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<table style="background:#6385ce; border:4px solid #1e3679; color:#fff; font-family: Cambria; font-size:10pt;">
<tbody>
<tr>
<td style="padding:8px;">
<strong style="font-size:12pt;">CAUTION:</strong> This email originated from outside. Do not click on links, open attachments, or reply unless you recognize the sender as well as the domain. Follow guidelines for validating payment information with Wires, ACH, etc.
</td>
</tr>
</tbody>
</table>
<!-- end snippet -->
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论