2013-10-14 73 views
0

我的代碼:的Gmail覆蓋字體顏色

<tr> 
    <td align="center" style="font-size:9pt; font-weight : bold;font-family:Arial; color:black;"> 
      SELLE ZETA CONFORT GEL 
    </td> 
</tr> 

當我不同的郵件客戶端上的嘗試,文字是黑色的,但在Gmail(資源管理器中,Chrome和Firefox)這段文字是藍色的。 我該如何解決這個問題?

如果你想尋找一個爲例: http://issl.fr/test/test_validator.html 採取所有代碼的HTML,並將其複製有: https://litmus.com/email-testing 你將能夠有每個客戶端上的預覽。看一下gmail。

回答

0

在電子郵件中,您必須使用6位十六進制代碼來實現跨電子郵件客戶端的最大兼容性。使用CSS文本即:color:#000000;,和HTML的bgcolor="#FFFFFF"爲背景

3

因爲你的文字是坐在一個<a>標籤(您<a>與您的文字環繞表中的話)。這就是爲什麼你的文字變成了藍色。給你的<a>塗一個顏色,那應該可以解決這個問題......約翰是正確的使用正確的十六進制代碼的顏色。

同樣,即使您聲明它應該是color:#000000,Gmail也希望在指向默認藍色的鏈接上更改color:#000000。使用color:#000001。這將解決它。

+1

這是正確的答案。 Gmail會將藍色鏈接換成黑色鏈接。如上所示使用#000001。 – GhostInTheSecureShell

0

用gmail你需要在你的顏色上多餘。

您不僅需要在其中聲明顏色,還應該用顏色將其包裝在一個範圍中。

這是下面正確的代碼

<Track Link> 
            <a style="text-decoration : none; color:#000000;" href="http://www.decathlon.be/selle-zeta-confort-gel-id_8052361.html"> 
             <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> 
              <tr><td> 
               <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> 
                <tr height="3"></tr><tr style="height : 32px !important; min-height : 32px !important; max-height : 32px !important; "> 
                 <td width="6"></td> 
                 <td align="left"> 
                  <div style="height :32px !important; min-height : 32px !important; max-height : 32px !important; "></div> 
                 </td> 
                 <td width="58"></td> 
                 <td align="right"> 
                  <div style="height :32px !important; min-height : 32px !important; max-height : 32px !important; "><img border="0" style="display:block;" width="64" height="32" alt=" " src="http://decathlonbe.net/images/Marques/geonaute.png"></div> 
                 </td> 
                 <td width="6"></td> 
                </tr><tr height="1"></tr> 
               </tbody></table> 
              </td></tr> 
              <tr><td> 
               <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody> 
                <tr> 
                 <td align="center"> 
                  <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"> 
                   <tr> 
                    <td width="5"></td> 
                    <td><img width="188" border="0" alt="" src="http://www.decathlon.be/media/805/8052361/classic_400PX_asset_71685950.jpg" style="display : block;"></td> 
                    <td width="5"></td> 
                  </table> 
                 </td> 
                </tr> 
                <tr> 
                 <td align="center" style="font-size:9pt; font-weight : bold;font-family:Arial; color:black;"><span style="color:#000000;">SELLE ZETA CONFORT GEL</span></td> 
                </tr> 
                <tr> 
                 <td align="center" style="font-size:9pt; font-family:Arial; color:#6f6f6f;"></td> 
                </tr> 
               </tbody></table> 
              </td></tr><tr><td> 
               <div class="price" style="font-family : Arial; font-size : 22pt; color : black; text-align : center;"><div class="nopromo" style="font-weight:bold;font-family : Arial; font-size : 19pt; color : black; text-align : center;">29<sup style="font-size:12pt;">&#128;95</sup></div></div> 
              </td></tr><tr><td> 
               <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody> 
                <tr> 
                 <td width="15"></td> 
                 <td valign="middle" align="center"> 
                  <Track Link><a style="text-decoration : none; font-family : Arial; font-weight : bold; font-size : 11pt; color : white;" href="http://www.decathlon.be/selle-zeta-confort-gel-id_8052361.html"><table align="center" cellspacing="0" cellpadding="0" border="0" style="background : #efefef;" > 
                    <tr height="32" style="background-color : #FF7100;"> 
                     <td width="5" ><span style="color: #FF7100;">i<span></td> 
                     <td style = "max-width: 144px;"> <div style="color : white;text-align:center; font-size : 10pt;font-family:Arial;font-weight: bold; ">sefsefse </div></td> 
                     <td style="padding-left : 5px;"> 
                      <span style="color : white; font-weight : bold; font-size : 12pt;"> > </span> 
                     </td> 
                     <td width="5"><span style="color: #FF7100;">i</span></td> 
                    </tr> 
                   </table> 
                  </a></Track Link> 
                 </td> 
                 <td width="15"></td> 
                </tr> 
                <tr height="8"></tr> 
               </tbody></table>  
              </td></tr> 
             </tbody></table> 
           </a> 
0

達里爾沃斯的答案是正確的項目之一。

我用顏色鏈接#00001在電子郵件中始終實現黑色鏈接。

我在一家機構工作,沒有人抱怨過它看起來不黑。