2012-06-07 109 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>