MailChimp Editable buttons inline styling is overridden

情到浓时终转凉″ 提交于 2019-12-03 20:30:57

The problem is caused by MailChimp adding in another <a href=""> into an editable <a>

A possible solution is to use either a * {styles:here} or a a {}.

A better solution would be to put the mc:edit on the preceding <td> instead of on the <a> to avoid

<a href="#"><a href="#">Link Text </a></a>

According to the W3C specification you should not have an <a> inside an <a>. In HTML email using valid HTML is a very good idea as the email clients render things oddly at the best of times.

Originally I had put the edit on the <a> to retain my layout, but I don't think that is the best option any more. I used to use the following code:

CSS

.button a {
    styles
}

HTML

<table>
  <tr>
    <td class="button">
        <a>Link Text</a>
    </td>
  </tr>
</table>

Update MailChimp will inline the style when you send it, and it will work on Gmail etc.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!