链接在html文件中不起作用

时间:2017-11-27 21:38:06

标签: html css email

我无法弄清楚为什么<a href..>中的链接不起作用。所有这些都是独立运作的链接。但是他们都没有在这段代码中工作。

我从我的客户那里收到了它并需要测试它。显示的是CSS代码和HTML的一部分,其中一个链接。它看起来不像HTML中的问题,所以我认为它必须在CSS部分。我不知道在哪里。

  #outlook a {
            padding: 0;
            }
            .body{
            width: 100% !important;
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
            margin: 0;
            padding: 0;
            }
            .ExternalClass {
            width:100%;
            }
            .ExternalClass,
            .ExternalClass p,
            .ExternalClass span,
            .ExternalClass font,
            .ExternalClass td,
            .ExternalClass div {
            line-height: 100%;
            }
            img {
            outline: none;
            text-decoration: none;
            -ms-interpolation-mode: bicubic;
            }
            a img {
            border: none;
            }
            p {
            margin: 1em 0;
            }
            table td {
            border-collapse: collapse;
            }
            /* hide unsubscribe from forwards*/
            blockquote .original-only, .WordSection1 .original-only {
            display: none !important;
            }
            @media only screen and (max-width: 500px){
            body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:none !important;} /* Prevent Webkit platforms from changing default text sizes */
            body{width:100% !important; min-width:100% !important;} /* Prevent iOS Mail from adding padding to the body */
            #bodyCell{padding:10px !important;}
            #templateContainer{
            max-width:500px !important;
            width:100% !important;
            }
            h1{
            font-size:24px !important;
            line-height:100% !important;
            }
            h2{
            font-size:20px !important;
            line-height:100% !important;
            }
            h3{
            font-size:18px !important;
            line-height:100% !important;
            }
            h4{
            font-size:16px !important;
            line-height:100% !important;
            }
            #templatePreheader{display:none !important;} /* Hide the template preheader to save space */
            #headerImage{
            height:auto !important;
            max-width:500px !important;
            width:100% !important;
            }
            .headerContent{
            font-size:20px !important;
            line-height:100% !important;
            }
            .bodyContent{
            font-size:18px !important;
            line-height:100% !important;
            }
            .footerContent{
            font-size:14px !important;
            line-height:100% !important;
            }
            .footerContent a{display:block !important;} /* Place footer social and utility links on their own lines, for easier access */
            }
<table width="100%" align="center" id="bodyTable" style="margin: 0px; padding: 0px; left: 99px; top: 74px; width: 500px; height: 800px; border-collapse: collapse !important; background-color: rgb(250, 250, 250);" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td align="center" id="bodyCell" valign="top" style="margin: 0px; padding: 20px; width: 100% !important; height: 100% !important; border-top-color: rgb(221, 221, 221); border-top-width: 4px; border-top-style: solid; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
                    <table id="templateContainer" style="border: 1px solid rgb(221, 221, 221); border-image: none; left: 159.5px; top: 53px; width: 500px; height: 800px; border-collapse: collapse !important;" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                            <tr>
                                <td align="center" valign="top" style="text-align: right;">
                                <p style="text-align: center;"><span style="color: rgb(63, 63, 63);">&nbsp;​<img src="http://prod-content01.smashfly.com/Images/11143/11143_7445_ADG_EmailHeader_dist.png" alt="" style="">&nbsp;</span></p>
                                <p style="font-family: Helvetica; text-align: right; font-size: 14px;"><span style="font-size: 10pt; font-family: Arial; color: rgb(63, 63, 63);">
                                    <a href="http://career.intel.com/i5Thc"><img src="https://recruit.smashfly.com/SmashFlyMedia/Images/11143/df4865ee-45d5-4bc1-a7a0-0ab7ff7000a1.png" alt="Facebook"></a>
                                  </span>
                                </p>
                              </td>
                            </tr>
                        </tbody>
                      </table>
                    </td>
                  </tr>
            </tbody>
</table>

1 个答案:

答案 0 :(得分:0)

删除ContentEditable =&#34; true&#34;从你的身体标签,它应该工作。你只能点击contentEditable = false的链接,虽然有一些解决方法。