問題描述
Hotmail ‑ HTML 電子郵件表格圖像間隙 (Hotmail ‑ HTML Email Table image gap)
Hotmail 似乎是唯一一個在兩個載有圖像的表格之間產生不必要間隙的客戶端。它們應該直接相互嵌套。'顯示:塊;' (在 img 標籤內)不是解決方案,因為我有多個單元格和圖像彼此相鄰(在帶有徽標的標題部分中)。
額外的垂直空間似乎出現在 tr, td , 或表頭部分中的表標籤。在 Hotmail 中,它創建一個 92 像素的高度,在所有其他瀏覽器中創建一個 89 像素(與圖像高度相同)。
(我還不能發布圖像 ‑ 沒有足夠的代表。)
代碼來自 jsFiddle。
我' 我試過玩線高和邊距。我似乎無法在 Hotmail 中做出任何調整來回复。有什麼線索嗎?(我已經閱讀了所有其他 html 電子郵件差距問題)
參考解法
方法 1:
Try setting cellspacing and cellpadding to "0".
Since it's Hotmail you'll probably be able to troubleshoot the e‑mail through your browser's code inspector (Chrome Inspector and/or Firebug). Try to find what elements are causing the gaps.
It's not such a good idea to use margin in an e‑mail since this can cause a lot of compatibility issues. How is this e‑mail behaving in Outlook 2007/2010/2013?