Ant*_*ony 5 html css height gmail minimum
所以我只是失去了几个小时的生命,试图赢得这场战斗,没有运气.总之,我试图用三张10px图像填充表格,但GMail强制每个单元格为16px.这是我正在使用的:
<table border="0" cellpadding="0" cellspacing="0" width="550" style="height:10px !important">
<tr style="height:10px" height="10">
<td width="10" height="10" style="height:10px !important">
<img src="http://s3.amazonaws.com/meagain/images/templates/letterhead/corner_tl.gif" style="display:inline; padding: 0px; margin:0px" width="10px" height="10px"></td>
<td width="531" height="10" style="height:10px !important; background-color:#FFFFFF;">
<img src="http://s3.amazonaws.com/meagain/images/templates/letterhead/spacer.gif" style="display:inline; padding: 0px; margin:0px" width="10px" height="10px"></td>
<td width="9" height="10" style="height:10px !important">
<img src="http://s3.amazonaws.com/meagain/images/templates/letterhead/corner_tr.gif" style="display:inline; padding: 0px; margin:0px" width="9px" height="10px"></td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
我很抱歉有这么多冗余属性,因为我一直在尝试一切.基本上,我正在尝试使表格精确地高出10px.然而,无论如何,GMail使其高出16px.如果我使用开发人员工具直接从源代码中删除所有三个图像,那么表将折叠为10px.此外,如果我删除三个图像中的2个,它仍然保持16px.如果TD包含图像,或者图像周围有3px的填充,那就好像TD必须是16px.
有没有人经历过这样的事情?如果是这样,任何想法?我的想法和理智已经用完了......
Jua*_*eda 10
像赫比说的那样,确保在TD上设置线高.
还要确保设置了字体大小,因为gmail可能会根据该单元格中的空格字符设置TD的最小高度.通常,在没有任何文本的单元格中设置1px的字体大小是很好的做法.
看起来这是为html电子邮件创建,对吗?看看这个问题还有其他任何问题 - 它帮助我多次帮助我http://www.emailology.org/#1和http://www.campaignmonitor.com/resources/获取提示.
| 归档时间: |
|
| 查看次数: |
3480 次 |
| 最近记录: |