【问题标题】:HTML newsletter - Gmail spacing above and below hyperlinked imagesHTML 时事通讯 - 超链接图像上方和下方的 Gmail 间距
【发布时间】:2015-05-10 18:30:38
【问题描述】:

我正在尝试创建一个 HTML 文档,该文档将作为时事通讯发送出去,但不幸的是它在 Gmail 中显示不正确。

由于某种原因,我在超链接的图像上方和下方遇到间距问题。像这样:

http://i.imgur.com/hesFibq.png

我已尝试添加:

style="border-spacing:0;"

到我在其他地方看到的桌子,以及下面的所有图片:

style="display:block;"

有什么想法吗?

编辑:这是 html 的原样:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>LCTSA</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table id="Table_01" width="701" height="375" border="0" cellpadding="0" cellspacing="0" style="border-spacing:0;">
	<tr>
		<td colspan="3" rowspan="2">
			<img src="http://www.morley.leeds.sch.uk/user/74/183839.png" width="473" height="279" alt="" style="display:block;"></td>
		<td>
			<a href="mailto:example@co.uk" style="display:block;"><img src="http://www.morley.leeds.sch.uk/user/74/183840.png" width="227" height="145" alt="" 

style="display:block;"></td></a>
		<td>
			<img src="http://www.morley.leeds.sch.uk/user/74/183848.gif" width="1" height="145" alt="" style="display:block;"></td>
	</tr>
	<tr>
		<td rowspan="3">
			<img src="http://www.morley.leeds.sch.uk/user/74/183841.png" width="227" height="179" alt="" style="display:block;"></td>
		<td>
			<img src="http://www.morley.leeds.sch.uk/user/74/183848.gif" width="1" height="134" alt="" style="display:block;"></td>
	</tr>
	<tr>
		<td rowspan="4">
			<img src="http://www.morley.leeds.sch.uk/user/74/183842.png" width="29" height="96" alt="" style="display:block;"></td>
		<td>
			<a href="mailto:example@co.uk" style="display:block;"><img src="http://www.morley.leeds.sch.uk/user/74/183843.png" width="176" height="14" alt="" 

style="display:block;"></td></a>
		<td rowspan="4">
			<img src="http://www.morley.leeds.sch.uk/user/74/183844.png" width="268" height="96" alt="" style="display:block;"></td>
		<td>
			<img src="http://www.morley.leeds.sch.uk/user/74/183848.gif" width="1" height="14" alt="" style="display:block;"></td>
	</tr>
	<tr>
		<td rowspan="3">
			<img src="http://www.morley.leeds.sch.uk/user/74/183845.png" width="176" height="82" alt="" style="display:block;"></td>
		<td>
			<img src="http://www.morley.leeds.sch.uk/user/74/183848.gif" width="1" height="31" alt="" style="display:block;"></td>
	</tr>
	<tr>
		<td>
			<a href="http://www.google.co.uk" target="_blank" style="display:block;"><img src="http://www.morley.leeds.sch.uk/user/74/183846.png" width="227" height="24" alt="" 

style="display:block;"></td></a>
		<td>
			<img src="http://www.morley.leeds.sch.uk/user/74/183848.gif" width="1" height="24" alt="" style="display:block;"></td>
	</tr>
	<tr>
		<td>
			<img src="http://www.morley.leeds.sch.uk/user/74/183847.png" width="227" height="27" alt="" style="display:block;"></td>
		<td>
			<img src="http://www.morley.leeds.sch.uk/user/74/183848.gif" width="1" height="27" alt="" style="display:block;"></td>
	</tr>
</table>
</body>
</html>

【问题讨论】:

  • 如@SLaks 所示。此外,GMail 可能正在对您的 HTML 进行后处理,因此您可能还需要检查那一侧。
  • 如何检查 Gmail 是否正在对我的 HTML @Buddy 进行后处理?到目前为止,我似乎没有尝试过任何工作>_
  • 应该有一个show original 选项。我发现 Gmail 弄乱了我的很多 HTML,有时直接更改 HTML 本身。

标签: html newsletter spacing


【解决方案1】:

你需要把&lt;a&gt;display: block.

【讨论】:

  • 感谢 SLaks 的评论。我刚刚尝试为 3 个链接这样做,但并没有改变它:( a href="mailto:example@example.com" style="display:block;">
  • 嗯。似乎即使我删除了所有标签,图像仍然没有正确对齐。
猜你喜欢
  • 2012-02-24
  • 2012-03-01
  • 2011-04-13
  • 2023-03-04
  • 1970-01-01
  • 2013-10-11
  • 2016-08-30
  • 2013-09-09
  • 2020-06-03
相关资源
最近更新 更多