所以我失去了幾個小時的生活,試圖贏得這場戰鬥,沒有運氣。總之,我試圖用三張10px圖像填充表格,但GMail強制每個單元格爲16px。這是我的工作:GMail強制TD包含spacer.gif爲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>
我很抱歉,有這麼多的冗餘屬性,因爲我一直在嘗試一切。基本上,我試圖讓桌子高出10px。但是,無論如何,GMail使它高出16px。如果我使用開發人員工具直接從源代碼中刪除所有三個圖像,那麼表格會摺疊爲10px。另外,如果我從三張圖像中刪除2張,它仍然保持16px。就好像TD必須是16px,如果它包含圖像,或者圖像周圍有3px的填充。
有沒有人遇到類似這樣的事情?如果是這樣,有什麼想法?我跑出來的思想,理智..
我們可以在此獲得更多的上下文嗎?這是怎麼發生的?在gmail.com你是動態插入表代碼的地方?或者您正在編輯現有的表格?這是通過Chrome擴展程序? – mrtsherman 2012-02-12 04:40:29