2012-06-07 102 views
2

我花了两周的时间为此找到任何解决方案,但无法完成。如果你把每经过漂浮表,就会出现在Microsoft Outlook 2007/2010一个像素的差距,这使用Microsoft Word 2007中的HTML渲染引擎:Outlook 2007/2010中浮动表格之间的水平间距

enter image description here

我会感谢你的任何可行的解决方案 - 这并不是要把表格分开<td>

下面是HTML代码复制它:

  • 搜索其他相关mso-

    • display: inline-table;而不是align="left"

      <html> 
          <head> 
          <title>Outlook 2007/2010 horizontal gap</title> 
          <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
          <style type="text/css"> 
           table { mso-table-lspace: 0pt; mso-table-rspace: 0pt; } 
          </style> 
      </head> 
      <body bgcolor="#000000"> 
          <table bgcolor="#ffff00" align="left"><tr><td>&nbsp;</td></tr></table> 
          <table bgcolor="#ffff00" align="left"><tr><td>&nbsp;</td></tr></table> 
      </body> 
      </html> 
      

      我到目前为止已经试过没有运气的CSS属性

    • <table>元件
    • border-collapse: collapseborder-spacing: 0
    • 添加border: 1px solid red;将除去间隙,但增加的表
    • 其它display的,paddingmargin
    • 非相关或弃用HTML属性的宽度(rules之间
    • 去除空格, frame,border等)<td>和/或<table>

    乐趣因素:

    如果你把这两个表到一个表,多余的缝隙的宽度将增加到2个像素。

  • 回答

    0

    在两个表格的每一个上尝试使用table border =“0”cellspacing =“0”cellpadding =“0”。如果我理解你的问题正确,这应该解决它:)

    +0

    不,这不会对问题有所帮助。表格边界之间的差距,即使这些值是0。 – adambrunner

    2

    下面是如何浮动表的例子。你需要边框=“1”和mso-table css的组合来摆脱1px的间隙。请参阅示例:

    <table bgcolor="#454545" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="5%"></td><td align="center" width="95%"> 
    
    
    <div align="left" style="float: left; padding: 0px; margin:0px;"> 
        <table border="1" bordercolor="#959595" cellpadding="0" cellspacing="0" align="left" style="padding: 0px; margin:0px; mso-table-lspace: -1pt; mso-table-rspace: -1pt; "> 
        <tr> 
         <td width="318" bgcolor="959595">table 1 
    
         </td> 
        </tr> 
        </table> 
    </div> 
    <div align="left" style="float: left; padding: 0px; margin:0px;"> 
        <table border="1" bordercolor="#959595" cellpadding="0" cellspacing="0" align="left" style="padding: 0px; margin:0px; mso-table-lspace:-1pt; mso-table-rspace: -1pt; "> 
        <tr> 
         <td width="318" bgcolor="959595">table 2 
    
         </td> 
        </tr> 
        </table> 
    </div> 
    
    
    </td></tr></table>