Outlook 2003 和字体大小

发布于 2024-10-04 01:51:06 字数 981 浏览 4 评论 0原文

我有一封 html 电子邮件,它在除 Outlook 2003 之外的每个客户端中都可以正常工作,其中链接有下划线(即使使用 text-decoration: none;)和 字体-size 变小。

代码摘录:

<td valign="top" align="left" style="line-height: 31px; font-size: 31px;">
                    <font face="Arial, Helvetica, sans-serif" size="3" color="#6b565d" style="line-height: 60px; font-size: 62px;"><strong>25% off</strong></font>
</td>

示例链接:

<font face="Arial, Helvetica, sans-serif" size="3" color="#ffffff" style="line-height: 16px; font-size: 22px;"><a href="<squeeze.attribute.link.story01_text>" title="Book your sale room now" style="color: #ffffff; text-decoration: none; font-size:22px; background-color: #b50f18;"><font color="#ffffff"><strong>Mooo, I'm some text >></strong></font></a></font>

font-size 更改为 11 或 12px 左右。

有什么想法吗?

I have a html email which works correctly in every client except Outlook 2003, where the links have underlines (even with text-decoration: none;) and the font-size changes to be smaller.

Excerpt from code:

<td valign="top" align="left" style="line-height: 31px; font-size: 31px;">
                    <font face="Arial, Helvetica, sans-serif" size="3" color="#6b565d" style="line-height: 60px; font-size: 62px;"><strong>25% off</strong></font>
</td>

Sample Link:

<font face="Arial, Helvetica, sans-serif" size="3" color="#ffffff" style="line-height: 16px; font-size: 22px;"><a href="<squeeze.attribute.link.story01_text>" title="Book your sale room now" style="color: #ffffff; text-decoration: none; font-size:22px; background-color: #b50f18;"><font color="#ffffff"><strong>Mooo, I'm some text >></strong></font></a></font>

And this font-size changes to around 11 or 12px.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

樱花坊 2024-10-11 01:51:06

您的代码中有很多标记。我刚刚尝试了发送电子邮件时 Outlook 2010 的标记的外观 - 因为在将邮件发送到 Outlook 2003 时,没有下划线的链接可以完美地工作。言归正传:需要

<a href="http://example.org">
    <span style='text-decoration:none;'>My Link Text not underlined</span>
</a>

注意的重要事项:它在其中放置了一个 span样式链接。没有使用任何

Outlook 有一个很好的“功能”来自动完成超链接 - 据我所知,这仅适用于您键入的文本,但它可能值得一试,也许客户端会自动完成您的链接以加下划线? (真的只是猜测)。有一个修补程序可以关闭自动完成链接此处(仍然需要在注册表中进行修改,然后在 HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences 中创建一个名为 DisableAutoUrlCompletion 的 DWORD)。

为了完整起见,这里使用 Outlook 2010 发送的一封非常简单的电子邮件的完整电子邮件正文在 Outlook 2003 中完美地显示(相同的字体大小,没有下划线 - 都一样)。 [请记住 - 其中有很多并不真正需要的 Microsoft“垃圾”,例如 Calibri 样式,尽管使用了 Arial]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o=
"urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns=
"http://www.w3.org/1999/xhtml">
<head>
  <meta name="Generator" content="Microsoft Word 14 (filtered medium)" />
  <style type="text/css">
/*<![CDATA[*/
  <!--
  /* Font Definitions */
  @font-face
  {font-family:Calibri;
  panose-1:2 15 5 2 2 2 4 3 2 4;}
  /* Style Definitions */
  p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0cm;
  margin-bottom:.0001pt;
  font-size:11.0pt;
  font-family:"Calibri","sans-serif";}
  a:link, span.MsoHyperlink
  {mso-style-priority:99;
  color:blue;
  text-decoration:underline;}
  a:visited, span.MsoHyperlinkFollowed
  {mso-style-priority:99;
  color:purple;
  text-decoration:underline;}
  span.EmailStyle17
  {mso-style-type:personal-compose;
  font-family:"Calibri","sans-serif";
  color:windowtext;}
  .MsoChpDefault
  {mso-style-type:export-only;
  font-family:"Calibri","sans-serif";}
  @page WordSection1
  {size:612.0pt 792.0pt;
  margin:70.85pt 70.85pt 2.0cm 70.85pt;}
  div.WordSection1
  {page:WordSection1;}
  -->
  /*]]>*/
  </style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->

  <title></title>
</head>

<body lang="EN-US" link="blue" vlink="purple" xml:lang="EN-US">
  <div class="WordSection1">
    <p class="MsoNormal"><span lang="DE" style=
    'font-size:14.0pt;font-family:"Arial","sans-serif";color:black' xml:lang=
    "DE"><a href="http://example.org/"><span style=
    'color:black;text-decoration:none'>test</span></a></span></p>
  </div>
</body>
</html>

Lot's of Markup in your code there. I just tried how Outlook 2010's markup looks when sending e-mail - because having links without underline works flawlessly when sending mails to Outlook 2003. Without further ado:

<a href="http://example.org">
    <span style='text-decoration:none;'>My Link Text not underlined</span>
</a>

The important thing to note: It puts a span within the link for styling. No usage of <font> whatsoever.

Outlook has the nice "feature" to autocomplete hyperlinks - AFAIK this is only for text you type, but it might be worth a shot, maybe the clients are autocompleting your links to be underlined? (Really just guessing). There is a hotfix to turn of autocompleting links here ( one still needs to fiddle in the registry and create a DWORD named DisableAutoUrlCompletion at HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences).

Just for completeness here the full e-mail body of a really simple e-mail sent with Outlook 2010 showing flawlessly in Outlook 2003 (same font size, no underline - all the same). [Bear in mind - lot's of Microsoft "junk" in there which is not really needed, like Calibri styles even though Arial was used]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o=
"urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns=
"http://www.w3.org/1999/xhtml">
<head>
  <meta name="Generator" content="Microsoft Word 14 (filtered medium)" />
  <style type="text/css">
/*<![CDATA[*/
  <!--
  /* Font Definitions */
  @font-face
  {font-family:Calibri;
  panose-1:2 15 5 2 2 2 4 3 2 4;}
  /* Style Definitions */
  p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0cm;
  margin-bottom:.0001pt;
  font-size:11.0pt;
  font-family:"Calibri","sans-serif";}
  a:link, span.MsoHyperlink
  {mso-style-priority:99;
  color:blue;
  text-decoration:underline;}
  a:visited, span.MsoHyperlinkFollowed
  {mso-style-priority:99;
  color:purple;
  text-decoration:underline;}
  span.EmailStyle17
  {mso-style-type:personal-compose;
  font-family:"Calibri","sans-serif";
  color:windowtext;}
  .MsoChpDefault
  {mso-style-type:export-only;
  font-family:"Calibri","sans-serif";}
  @page WordSection1
  {size:612.0pt 792.0pt;
  margin:70.85pt 70.85pt 2.0cm 70.85pt;}
  div.WordSection1
  {page:WordSection1;}
  -->
  /*]]>*/
  </style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->

  <title></title>
</head>

<body lang="EN-US" link="blue" vlink="purple" xml:lang="EN-US">
  <div class="WordSection1">
    <p class="MsoNormal"><span lang="DE" style=
    'font-size:14.0pt;font-family:"Arial","sans-serif";color:black' xml:lang=
    "DE"><a href="http://example.org/"><span style=
    'color:black;text-decoration:none'>test</span></a></span></p>
  </div>
</body>
</html>
懒猫 2024-10-11 01:51:06

@Neurofluxation:尝试 -

对于摘录:

<td valign="top" align="left">
   <span style="color: #6b565d; font-size: 62px; line-height: 60px;"><strong>25% off</strong></span>
</td>

对于链接:

<a href="<squeeze.attribute.link.story01_text>" title="Book your sale room now" style="background-color: #b50f18; color: #ffffff; font-size: 22px; line-height: 16px; text-decoration: none;"><strong>Mooo, I'm some text >></strong></a>

这里还有一个跨多个电子邮件客户端的 CSS 支持的便捷指南: http://www.campaignmonitor.com/css/

@Neurofluxation: Try --

For the excerpt:

<td valign="top" align="left">
   <span style="color: #6b565d; font-size: 62px; line-height: 60px;"><strong>25% off</strong></span>
</td>

For the link:

<a href="<squeeze.attribute.link.story01_text>" title="Book your sale room now" style="background-color: #b50f18; color: #ffffff; font-size: 22px; line-height: 16px; text-decoration: none;"><strong>Mooo, I'm some text >></strong></a>

Here's also a handy guide for CSS support across a multitude of e-mail clients: http://www.campaignmonitor.com/css/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文