【问题标题】:Yahoo mail replacing inline width with min-width雅虎邮件用最小宽度替换内联宽度
【发布时间】:2016-10-07 14:53:42
【问题描述】:

在过去的几天里,我们看到我们的时事通讯无法像以前在 Yahoo Mail 中那样打印。一些<td> 元素占用了它们本应占用的更多空间。经过一番检查,我们发现内联样式中的width 属性被min-width 替换。

我试图查看雅虎邮箱是否有任何变化,但我找不到任何东西。我在 github 中发现的唯一一个问题是,它解释了这种行为在 Yahoo 和 Gmail 中是如何发生的,height。我检查了 Gmail,但它没有发生,上周雅虎邮箱一切正常。

有人遇到同样的问题吗?有谁知道这个解释吗?

This is one of the newsletters 遇到问题,this is how we see it now

【问题讨论】:

  • 我认为<table> 布局导致了这个问题。您是否尝试过改用 <div> 布局?
  • 并非如此,因为它曾经是这样工作的。似乎另一个人也问了同样的问题,他得到了an interesting answer。无论如何,非常感谢您的建议,@AkhileshBChandran。
  • 更新: 雅虎已经修复了他们的错误,所以这个问题应该不再存在了!

标签: css html-email newsletter yahoo-mail


【解决方案1】:

I answered this question earlier today,这是答案:


快速修复,把它放在你的<style>标签中:@media yahoo {min-width:0!important}

此更改/错误在此发布时是全新的。雅虎现在将宽度更改为最小宽度,打破了混合布局等。 the Litmus Community 中有关于其他 hack 的很好的讨论。

【讨论】:

    【解决方案2】:
    • 在我看来,表格元素是按钮的父元素。
    • 对于(父)表格元素,我将“!important”放在“min-width”旁边,没有空格。
    • html 被放置在“内联”中。请参见下面的示例:

    <table align="center" width="200px" bgcolor="#0076be" style="border-spacing:0;Margin:0 auto;width:95%;max-width:200px; min-width:0%!important;">
    • 按钮元素没有“宽度”的内联样式元素。
    • 请参见下面的示例:

    <a href="[[asset_1]]" style="color: #fff;text-decoration: underline;"><img src="[[asset_3]]" width="195px" style="border-width:0;max-width: 195px; height:auto;display:block;margin:0 auto;" border="0" alt="Click Show Images to Make Links Work"></a>

    访问Yahoo Mail Update Potentially Breaks Hybrid Emails了解更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-17
      • 1970-01-01
      • 2013-05-14
      • 1970-01-01
      • 2011-10-18
      • 2012-05-08
      • 1970-01-01
      相关资源
      最近更新 更多