Outlook 2010 overriding font-family from Arial to

2019-01-31 05:34发布

I'm programmatically sending HTML-formatted email, and setting the font as Arial throughout (font-family: Arial;). When the messages arrive in Outlook 2010, text in table elements is in Times New Roman. Text in div elements is fine in Arial. If I View Source, copy into an HTML file, and view in a browser, all fonts function as expected (it's all Arial).

Some Google results show that Outlook will fall back to its default font (Times New Roman) when none is specified, but that's not what's happening here.

Why is Outlook forcing my email to display in Times New Roman when specified otherwise?

10条回答
做自己的国王
2楼-- · 2019-01-31 06:12

I had the same problem....all text in the body of the email was Arial, but the table defaulted to word. I had to wrap the font in each each cell......time consuming..

查看更多
戒情不戒烟
3楼-- · 2019-01-31 06:13
<!--[if mso]>
<style> body,table tr,table td,a, span,table.MsoNormalTable {  font-family:Arial, Helvetica, sans-serif !important;  }</style>
<!--<![endif]-->
查看更多
SAY GOODBYE
4楼-- · 2019-01-31 06:17

Even if you set font-family: arial to table, it still wont work. You need to specifically set the font for each td inside your table to get it right.

查看更多
爷的心禁止访问
5楼-- · 2019-01-31 06:17

The <font> tag is deprecated but since Outlook 2010 is removing (almost all) styles, this is the only way it works.

查看更多
我想做一个坏孩纸
6楼-- · 2019-01-31 06:18

This issue was happening from outlook 2007 and the previous solutions didn't work for me, the only solution that seems to work is wrapping the text with <font face="arial, sans-serif">My text with arial</font>

查看更多
可以哭但决不认输i
7楼-- · 2019-01-31 06:25

table.MsoNormalTable {font-size:12.0pt; font-family:"Times New Roman";} Open your HTML with Text Pad, and change it to Arial.

查看更多
登录 后发表回答