我使用表格,因爲我需要發送html電子郵件。 任何方式我的麻煩是這樣的:我有兩個圖像堆疊在一起。它們都是鏈接,意味着在標籤內。問題是在IE8中無法擺脫的兩幅圖像之間出現白色填充。 這是代碼:填充<a>表中的標籤
<table cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="http://wwwXXXXXX.com/screening.php" border="0" style="padding:0;margin:0;line-height: 0px">
<img src="http://www.XXXXXXX.com/emails/images/host.jpg" border="0" />
</a>
</td>
</tr>
<tr>
<td>
<a href="mailto:[email protected]" border="0" style="padding:0;margin:0;line-height: 0px">
<img src="http://www.XXXXXX.com/emails/images/bottom_all.jpg" border="0" />
</a>
</td>
</tr>
</table>
的空間展示只有在那裏有一個標籤(嘗試過的圖像 - 沒問題)。最初的填充出現在Firefox和IE8中,而不是鉻。在firefox中加入'line-height'作品後,IE8依然沒有什麼好處......
有什麼想法嗎?
編輯:實際上,我發現這個問題不僅出現在表中,但只要你有IMG包裹在錨。像這樣:
<a href="http://wwwXXXXXX.com/screening.php" border="0" style="padding:0;margin:0;line- height: 0px">
<img src="http://www.XXXXXXX.com/emails/images/host.jpg" border="0" />
</a>
<a href="http://wwwXXXXXX.com/screening.php" border="0" style="padding:0;margin:0;line-height: 0px">
<img src="http://www.XXXXXXX.com/emails/images/host.jpg" border="0" />
</a>
感謝,這工作更好的答案! – 2012-01-09 12:07:54