“Word-break” 和 “Word-wrap” 在 HTML 邮件中的 CSS 问题。

huangapple go评论65阅读模式
英文:

Word-break \ Word-wrap CSS issues in HTML email

问题

以下是您要翻译的内容:

"So we're using Dynamics 365 Marketing for our email marketing platform. In house we use Office 365 & a lot of our customers also use it (as we market to Corporate businesses). Oh, and the OS on our machines is Win10.

Something has changed (either with D365 or Office 365) over the Easter break; While in the HTML i have always had word-break: normal; word-wrap: normal on <td> tags - we come back from easter and suddenly headings in the email render like this (in office 365).

If i view the email in the browser then word-break isn't happening (and it looks like this) & at the same time if i view the email in Outlook 2016 (on Win10) the word-break's are also not appearing. Does anyone know if MS\Outlook has its own styling for word-breaks? Or anyone have any suggestions?

this gives an idea of the code for the banner;

i know this is a rather abstract question... ive just got the marketing dept & exec's getting pissy with me as i don't have an explanation for what's going on."

请注意,我只提供内容的翻译,不提供答案或解释。如果您需要更多帮助,请告诉我。

英文:

So we're using Dynamics 365 Marketing for our email marketing platform.
In house we use Office 365 & alot of our customers also use it (as we market to Corporate businesses). Oh, and the OS on our machines is Win10.

Something has changed (either with D365 or Office 365) over the Easter break;
While in the HTML i have always had word-break: normal; word-wrap: normal on &lt;td&gt; tags - we come back from easter and suddenly headings in the email render like this (in office 365).

“Word-break” 和 “Word-wrap” 在 HTML 邮件中的 CSS 问题。

If i view the email in the browser then word-break isn't happening (and it looks like this) & at the same time if i view the email in Outlook 2016 (on Win10) the word-break's are also not appearing.
“Word-break” 和 “Word-wrap” 在 HTML 邮件中的 CSS 问题。

Does anyone know if MS\Outlook has its own styling for word-breaks?

Or anyone have any suggestions?

this give's an idea of the code for the banner;

i know this is a rather abstract question... ive just got the marketing dept & exec's getting pissy with me as i don't have an explanation for what's going on.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-css -->

p {
  word-break: normal;
  word-wrap: normal;
}

td {
  word-break: normal;
  word-wrap: normal;
}

div {
  word-break: normal;
  word-wrap: normal;
}

<!-- language: lang-html -->

&lt;td style=&quot;vertical-align: middle; text-align: left;&quot; valign=&quot;middle&quot; align=&quot;left&quot;&gt;
  &lt;table style=&quot;float:none;width:100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td style=&quot;height:26px;line-height:26px&quot; valign=&quot;top&quot; height=&quot;26&quot; align=&quot;left&quot;&gt;&amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td class=&quot;banner-text-1 bannerLargeColor&quot; style=&quot;font-size: 12px; line-height: 12px; font-weight: 700; letter-spacing: 4px; vertical-align: top; text-align: left;&quot; valign=&quot;top&quot; align=&quot;left&quot;&gt;
          &lt;!--&lt;div data-sub-block=&quot;true&quot; data-block-datatype=&quot;Text&quot;&gt;&lt;p style=&quot;margin: 0px; padding: 0px; mso-line-height-rule: at-least;&quot;&gt;&lt;span style=&quot;font-size:12px;&quot;&gt;&lt;strong&gt;MEMBERSHIP&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;--&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;height:9px;line-height:9px&quot; valign=&quot;top&quot; height=&quot;9&quot; align=&quot;left&quot;&gt;&amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td class=&quot;banner-text-2&quot; style=&quot;font-size: 24px; line-height: 23px; color: #fff; font-weight: 700; letter-spacing: 4px; vertical-align: top; text-align: left;&quot; valign=&quot;top&quot; align=&quot;left&quot;&gt;
          &lt;div data-sub-block=&quot;true&quot; data-block-datatype=&quot;Text&quot;&gt;
            &lt;p style=&quot;margin: 0px; padding: 0px; word-break: normal; font-size:24px;&quot;&gt;&lt;strong&gt;THANK YOU FOR ATTENDING 2023 INFRASTRUCTURE CONFERENCE&lt;/strong&gt;&lt;/p&gt;
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;height:26px;line-height:26px&quot; valign=&quot;top&quot; height=&quot;26&quot; align=&quot;left&quot;&gt;&amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/td&gt;

<!-- end snippet -->

答案1

得分: 1

尝试使用 "mso-hyphenate: none"。这会移除单词断字。

英文:

Try using "mso-hyphenate: none" That removed the word breaks for me.

答案2

得分: 0

我还没有找到解决办法,但我也注意到这个问题是在4月10日出现的。我们不使用Dynamics 365 Marketing,但我团队中的一位使用Windows Outlook的同事在那天发送测试邮件时指出了这个问题。我的代码没有指定任何单词断开或换行的行为,但直到现在我都没有遇到过这个问题。

英文:

I don't have a fix yet, but I also noticed this problem on April 10. We don't use Dynamics 365 Marketing, but someone on my team who has Windows Outlook pointed out the problem when I sent a test that day. My code doesn't specify any word-break or word-wrap behavior, but I've never had an issue until now.

huangapple
  • 本文由 发表于 2023年4月13日 15:30:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76002753.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定