我尝试添加cellspacing =“0”cellpadding =“0”。不解决电子邮件客户端中的问题。
以下是gmail中间距的图片:
http://i44.tinypic.com/dmywpe.png
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Openx Webinar</title>
</head>
<body>
<div style="margin:0;padding:0;font-family:Arial,Helvetica,sans-serif">
<table align="center" width="600" cellspacing="0" cellpadding="0" style="font-family:Arial,Helvetica,sans-serif" >
<!-- Header -->
<thead>
<tr>
<td id="header" width="600" valign="top" align="left"><img src="http://openx.dev.limusdesign.com/emails/webinar/images/header.png" alt="OpenX Webinar Series"/></td>
</tr>
<tr>
<td id="banner" width="600" valign="top" align="left"><img src="http://openx.dev.limusdesign.com/emails/webinar/images/banner.png" alt="Banner Image"></td>
</tr>
<tr>
<td width="600" height="20" valign="top" align="left"></td>
</tr>
</thead>
</table>
</div>
</body>
<html>
关于如何解决此问题的任何建议?注意:这适用于HTML电子邮件。
更新的标题代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Openx Webinar</title>
<style type="text/css">
div, p, a, li, td { -webkit-text-size-adjust:none; }
</style>
</head>
<body>
<div style="margin:0;padding:0;font-family:Arial,Helvetica,sans-serif">
<table align="center" width="600" cellspacing="0" cellpadding="0" style="font-family:Arial,Helvetica,sans-serif" >
<!-- Header -->
<thead>
<tr>
<td id="header" width="600" valign="top" align="left">
<img src="http://openx.dev.limusdesign.com/emails/webinar/images/header.png" alt="OpenX Webinar Series" height="65" style="display:block">
</td>
</tr>
<tr>
<td id="banner" width="600" valign="top" align="left">
<img src="http://openx.dev.limusdesign.com/emails/webinar/images/banner.png" alt="Banner Image" height="180" style="display:block">
</td>
</tr>
<tr>
<td width="600" height="20" valign="top" align="left"></td>
</tr>
</thead>
</table>
</div>
</body>
</html>
答案 0 :(得分:8)
通过向图片添加style="display:block"
来解决此问题。
答案 1 :(得分:1)
将您的代码更改为:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Openx Webinar</title>
</head>
<body>
<div style="padding:0;font-family:Arial,Helvetica,sans-serif">
<table align="center" width="600" cellspacing="0" cellpadding="0" border="0" style="font-family:Arial,Helvetica,sans-serif" >
<tr>
<td id="header" width="600" valign="top" align="left" style="padding:0px;outline:none;border:none;">
<img src="http://openx.dev.limusdesign.com/emails/webinar/images/header.png" alt="OpenX Webinar Series" style="padding:0px;outline:none;border:none;"/>
</td>
</tr>
<tr>
<td id="banner" width="600" valign="top" align="left" style="padding:0px;outline:none;border:none;">
<img src="http://openx.dev.limusdesign.com/emails/webinar/images/banner.png" alt="Banner Image" style="padding:0px;outline:none;border:none;">
</td>
</tr>
<tr>
<td width="600" height="20" valign="top" align="left"></td>
</tr>
</table>
</div>
</body>
</html>
答案 2 :(得分:0)
您可以更改包含第一张图片的<td></td>
的显示选项:
thead tr:first-child td
{
display: block;
height:65px;
}
或img本身
thead tr:first-child td img
{
display: block;
}
答案 3 :(得分:0)