【问题标题】:between two tables am getting vertical space like 1px of border in outlook 2013, 2010, and 2007在 Outlook 2013、2010 和 2007 中,两个表之间的垂直空间类似于 1px 的边框
【发布时间】:2015-02-06 04:52:11
【问题描述】:

在 Outlook 2013、2010 和 2007 中,两个表格之间的垂直空间为 1px 的边框。

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="700" align="left" border="0" cellspacing="0" cellpadding="0" bgcolor="#fffcf5" style="background-color:red; border:none; mso-table-lspace:0pt; mso-table-rspace:0pt; border-collapse:collapse;">
  <tr>
    <td width="15"><table width="300" align="left" border="0" cellspacing="0" cellpadding="0" bgcolor="#fffcf5" style="background-color:#000000; border:none; mso-table-lspace:0pt; mso-table-rspace:0pt; border-collapse:collapse;" background="#000000">
        <tr>
          <td width="15" height="170">logo </td>
        </tr>
      </table>
      <table width="490" height="170px" align="left" border="0" cellspacing="0" cellpadding="0" bgcolor="#fffcf5" style="background-color:#000000; border:none; mso-table-lspace:0pt; mso-table-rspace:0pt; border-collapse:collapse;" background="#000000">
        <tr bgcolor="#ffffff">
          <td width="15" height="35px">emptyspace</td>
        </tr>
        <tr bgcolor="red">
          <td width="15" height="100">heading</td>
        </tr>
        <tr bgcolor="#ffffff">
          <td width="15" height="35">emptyspace</td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

它在 chrome 和 Firefox 浏览器中运行良好。

这是在 Outlook 2013 中出现错误的图像。您好,先生,这里在 Outlook 2013 中遇到了一些问题,所以我正在发送屏幕截图,请看看并帮助我。!

【问题讨论】:

    标签: html css outlook


    【解决方案1】:

    您的电子邮件中有一些过大的宽度,试试这个...

    <table width="700" border="0" cellspacing="0" cellpadding="0" 
    		style="background-color:green; 
    				border:none;  
    				border-collapse:collapse;">
      <tr>
        <td>
    		<table width="300" align="left" border="0" cellspacing="0" cellpadding="0" bgcolor="orange" 
    			style="	border:none;  
    					border-collapse:collapse;">
    			<tr>
    			  <td width="15" height="170">logo </td>
    			</tr>
    		</table>
    
    		<table width="400" height="170px" align="left" border="0" cellspacing="0" cellpadding="0" bgcolor="#fffcf5" 
    				style="background-color:#000000; 
    						border:none;  
    						border-collapse:collapse;">
    				<tr bgcolor="#ffffff">
    				  <td width="15" height="35px">emptyspace</td>
    				</tr>
    				<tr bgcolor="red">
    				  <td width="15" height="100">heading</td>
    				</tr>
    				<tr bgcolor="#ffffff">
    				  <td width="15" height="35">emptyspace</td>
    				</tr>
    		</table>
    	  </td>
      </tr>
    </table>
    </table>

    在电子邮件中,您需要添加 style="display:block;"为他们删除填充的图像

    【讨论】:

    • 取自您的描述的下半部分,您说的是图像吧?
    • 嗨亚伦感谢您的重播。但这里是在两个表之间而不是内部内容。这意味着当我在主表中添加两个表时,两个表之间的空间就像 1px 间隙一样。提前致谢。
    • 嗨 Aaron 感谢您查看我的代码,这里没有在单行中获得两个表,它逐行拆分请查看 chrome 和 firefox 中的 Outlook 2013 和 07,10 工作正常。跨度>
    【解决方案2】:

    style="margin: 0px;" 添加到所有表格、tr 和td,因为如果未指定边距,Outlook 会自动在表格周围添加1px 的边距。

    您可能还需要添加padding: 0px;

    这是基于我自己的尝试和错误,如果它不起作用,请在下面评论,我会尝试更新我的答案。

    【讨论】:

    • 嗨 Calv T 感谢您重播我的问题。但是outlook 2013, 07,10 两个表之间仍然存在边框1px 的问题。因此,如果您有任何解决方案,请提前给我发帖谢谢。
    • 嗨 Calv T 感谢您的重播,必须登录 www.mailchimp.com,在这里我们可以将我们的 html 文件作为邮件发送到您办公桌上的配置邮件中。所以我们可以在那里找到错误。并且只有在outlook 2013,10,07才可以发现错误。
    • @RamanaV 我问这个是因为在运行您在测试中给出的 EXACT html 之后,我没有得到任何空格。你确定你没有 mailchimp 内联的外部 css 吗?
    • 另外,您的屏幕截图与您的代码不同?您的代码中没有绿色...
    • 嗨 Calv T. yeh 它的变化不大。检查此代码....仍然遇到这个问题
    猜你喜欢
    • 1970-01-01
    • 2012-09-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多