Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 电子邮件客户端上的按钮看起来被压扁了_Html_Css - Fatal编程技术网

Html 电子邮件客户端上的按钮看起来被压扁了

Html 电子邮件客户端上的按钮看起来被压扁了,html,css,Html,Css,我正在使用以下代码创建一个按钮: <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <table cellspacing="0" cellpadding="0"> <tr> <td style="border-radius: 2p

我正在使用以下代码创建一个按钮:

    <table width="100%" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <table cellspacing="0" cellpadding="0">
                <tr>
                    <td style="border-radius: 2px;" bgcolor="#1AB394">
                        <a href="https://www.example.com" target="_blank" style="padding: 8px 12px; border: none; border-radius: 4px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #ffffff; text-decoration: none; font-weight: normal; display: inline-block;">
                            CONFIRM ACCOUNT             
                        </a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
  </table>
该按钮用于电子邮件。当我发送电子邮件时,该按钮在web邮件客户端上看起来很好:

但在某些其他邮件客户端(如Outlook)上显示不正确:


有人能帮忙吗?谢谢。

您可能想看看这个:

项目3

我无法测试这些,因为我不使用outlook作为客户机,但它们似乎建议您可能需要比您更频繁地设置包含a标记的td的样式。它看起来确实不像您在样式中那样将a标记作为内联块处理。如果添加:

padding: 8px 12px;
到可能修复按钮外观的封闭td