2014-07-08 22 views
0
<table border="0px" cellpadding="0" cellspacing="0" width="700" height="50" style="margin:0px 0px 0px 0px;text-align:center;" > 
    <tr> 
     <td> 
      <p style="background-color:#dedede;line-height:25px;font-family: verdana,sans-serif;font-size:9px;">For more information on delegate registration and sponsorship opportunities</p> 
      <img style="margin-top:0;" width="700" height="9" src="http://i61.tinypic.com/28cfx3m.jpg" alt="bottombanner"/> 
     </td> 
    </tr> 
</table> 

這是js fiddle如何將兩個img之間的空格轉換成tot格式時去掉?

在上面的代碼中,有一個白色空間出現在<p> & <img>標記之間,當它將其轉換爲格式/電子郵件格式時。如何刪除該空白區域而不給出負值。 在此先感謝。

+0

你有CSS重置? –

+0

您的代碼中只有一個img標籤,您的問題是 - 如何刪除兩個圖像中的空白區域....奇怪...您的js fiddel顯示沒有空格... –

+0

對不起,先生,我的錯誤。實際上它的一個img標籤和p標籤。 – Dulquer

回答

1

嘗試增加在IMG風格垂直對齊

<img style="margin-top:0; vertical-align:top;" width="700" height="9" src="http://i61.tinypic.com/28cfx3m.jpg" alt="bottombanner"/> 

這裏的jsfiddle - http://jsfiddle.net/GWAkp/3/

編輯代碼:---見主編P類

<table cellpadding="0" cellspacing="0" width="700" height="50" style="margin:0px 0px 0px 0px;text-align:center;" > 
<tr> 
    <td> 
     <p style="background-color:#dedede;line-height:25px;font-family: verdana,sans-serif;font-size:9px;margin-bottom:0px; padding-bottom:0px;">For more information on delegate registration and sponsorship opportunities</p> 
     <img style="margin-top:0px; vertical-align:top;" width="700" height="9" src="http://i61.tinypic.com/28cfx3m.jpg" alt="bottombanner"/> 
    </td> 
    </tr> 
</table> 

JS小提琴 - http://jsfiddle.net/GWAkp/6/

0

display: block;img

margin: 0p

CSS

img { 
    display: block 
} 
p { 
    margin: 0 
} 

這裏是demo