Email HTML响应电子邮件堆叠列不工作

Email HTML响应电子邮件堆叠列不工作,email,mobile,Email,Mobile,我一直在尝试将这些列堆叠起来,但似乎没有解决方案。有好几层嵌套表(这里没有全部显示)来保持客户端之间的结构一致,但我不知道这是否与我的列不堆叠的原因有关。我曾尝试将媒体查询应用于td、table和div元素,但我在几个网站上读到的解决方案都不起作用。以下是我的代码要点: <head> <style> table[class="main-table"] { width: 625px !important; } td[class="colsplit"] {

我一直在尝试将这些列堆叠起来,但似乎没有解决方案。有好几层嵌套表(这里没有全部显示)来保持客户端之间的结构一致,但我不知道这是否与我的列不堆叠的原因有关。我曾尝试将媒体查询应用于td、table和div元素,但我在几个网站上读到的解决方案都不起作用。以下是我的代码要点:

<head>
<style>
  table[class="main-table"] {
  width: 625px !important;
  }
  td[class="colsplit"] {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    font-size: 12px !important;
  }
  table[class="colsplit"] {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    font-size: 12px !important;
}
</style>
</head>

<body>
<table class="main-table" align=center width=625px style="color:#787878; border-spacing:0; border-collapse:collapse; text-decoration:none;" border=0>  
  <!-- Contact Us -->
  <tr>
    <!-- Advertise column -->
    <td class="colsplit" align=left width=50% style="vertical-align:top; padding:0px; margin:0px; display:block;">
      <table class="colsplit" width=100% style="border-color:orange; border-width:5px; border-style:solid;">
        <tr>
          <td class="colsplit" align=left style="color:#787878; font-size:16px; font-family:Arial, Helvetica, Sans Serif; font-weight:bold; margin:0px; padding:0px 0px 10px 10px;">Advertise
          </td>
        </tr>
        <tr>
          <td class="colsplit" style="vertical-align:top; color:#787878; font-size:12px; font-family:Arial, Helvetica, Sans Serif; margin:0px; padding:0px 0px 10px 10px;">To advertise in our newsletter, please email:
            <br>
            <a href="mailto:email@domain.com" style="color:#333333; text-decoration:none;"><strong>email@domain.com</strong>
            </a>
          </td>
        </tr>
      </table>
    </td>
    <!-- Advertise column close -->
    <!-- Services column -->
    <td class="colsplit" align=left width=50% style="vertical-align:top; padding:0px; margin:0px; display:block;">
      <table class="colsplit" align=left width=100% style="border-color:orange; border-width:5px; border-style:solid;">
        <tr>
          <td class="colsplit" style="color:#787878; font-size:16px; font-family:Arial, Helvetica, Sans Serif; font-weight:bold; margin:0px; padding:0px 20px 10px 0px;">Newsletter Services
          </td>
        </tr>
        <tr>
          <td class="colsplit" style="vertical-align:top; color:#787878; font-size:12px; font-family:Arial, Helvetica, Sans Serif; margin:0px; padding:0px 20px 10px 0px;">Interested in reading more?
            <br>Click the link below to
            <br>
            <a href="http://links.email.dmnews.com/ctt?kn=10&ms=MTI0NDc1MTgS1&r=MjE1MTE3OTc2ODc0S0&b=3&j=NjIxMzY0NDMzS0&mt=1&rt=0" name="DMNregister" style="color:#333333; text-decoration: none;"><strong>Sign Up for Our Newsletters</strong>
            </a>
          </td>
        </tr>
        <tr>
          <td class="colsplit" style="vertical-align:top; color:#787878; font-size:12px; font-family:Arial, Helvetica, Sans Serif; margin:0px; padding:0px 20px 10px 0px;">If you no longer wish to receive this newsletter, click here to
            <br>
            <a href="http://www.pages05.net/haymarketmediagrouplimited/DirectMarketingNews/dmnunsubscribe?spMailingID=12447518&spUserID=MjE1MTE3OTc2ODc0S0&spJobID=NjIxMzY0NDMzS0&spReportId=NjIxMzY0NDMzS0" name="Unsubscribe" style="color:#333333; text-decoration: none;" target="_blank" xt="LPWEBFORMOPTIN" xtwebform="1740515"><strong>unsubscribe</strong>
            </a>
          </td>
        </tr>
        <tr>
          <td class="colsplit" style="vertical-align:top; color:#787878; font-size:12px; font-family:Arial, Helvetica, Sans Serif; margin:0px; padding:0px 20px 10px 0px;">To manage your account and Newsletter settings, click here for
            <br>
            <a href="http://links.email.dmnews.com/ctt?kn=8&ms=MTI0NDc1MTgS1&r=MjE1MTE3OTc2ODc0S0&b=3&j=NjIxMzY0NDMzS0&mt=1&rt=0" name="ManageAccount" style="color:#333333; text-decoration:none;"><strong>My Account</strong>
            </a>
          </td>
        </tr>
      </table>
    </td>
    <!-- Services column close -->
  </tr>
  <!-- Contact Us close -->
</table>
</body>

表[class=“main table”]{
宽度:625px!重要;
}
td[class=“colsplit”]{
显示:块!重要;
宽度:100%!重要;
高度:自动!重要;
字体大小:12px!重要;
}
表[class=“colsplit”]{
显示:块!重要;
宽度:100%!重要;
高度:自动!重要;
字体大小:12px!重要;
}
做广告
要在我们的时事通讯中刊登广告,请发送电子邮件:

通讯服务 有兴趣阅读更多吗?
单击下面的链接以
如果您不再希望收到此通讯,请单击此处
要管理您的帐户和新闻稿设置,请单击此处查看

表格的列不会堆叠。众所周知,处理表格很困难,因为它们不尊重大多数CSS。根据电子邮件的显示位置,
元素可能会被过滤掉。改为内联您的样式。(mailchimp等提供了相关工具)堆叠是一种移动响应设计。我设计HTML电子邮件已经有一段时间了,所以我知道如何浏览每个桌面客户端的所有怪癖。我的问题是,当移动设备缩小电子邮件以适应屏幕时,我的一张有多列和小文本的表格变得很小以至于难以辨认,或者这些列挤在一起看起来很难看。我一直在读一篇又一篇关于人们如何让他们的表列堆叠起来的文章,但我肯定错过了一些东西,因为这对我不起作用。