【问题标题】:HTML email stuck on the write in apple mailHTML 电子邮件卡在 Apple 邮件中的写入处
【发布时间】:2018-09-29 03:30:32
【问题描述】:

HTML 初学者。我已经创建了这个 html 电子邮件,它在 Thunderbird 中显示得非常好并且处于中心位置,但在 Apple Mail 中,它卡在了右边,有人有什么想法吗? this is the email in apple mail that is aligned to the right - I want it in the centre!

    <!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width">

    <title>Fusion CSA Accept Email</title>
    <style type="text/css">

          /* -------------------------------------
              RESPONSIVE AND MOBILE FRIENDLY STYLES
          ------------------------------------- */
          @media only screen and (max-width: 620px) {
            table[class=body] h1 {
              font-size: 28px !important;
              margin-bottom: 10px !important;
            }
            table[class=body] p,
                  table[class=body] ul,
                  table[class=body] ol,
                  table[class=body] td,
                  table[class=body] span,
                  table[class=body] a {
              font-size: 16px !important;
            }
            table[class=body] .wrapper,
                  table[class=body] .article {
              padding: 10px !important;
            }
            table[class=body] .content {
              padding: 0 !important;
            }
            table[class=body] .container {
              padding: 0 !important;
              width: 100% !important;
            }
            table[class=body] .main {
              border-left-width: 0 !important;
              border-radius: 0 !important;
              border-right-width: 0 !important;
            }
            table[class=body] .btn table {
              width: 100% !important;
            }
            table[class=body] .btn a {
              width: 100% !important;
            }
            table[class=body] .img-responsive {
              height: auto !important;
              max-width: 100% !important;
              width: auto !important;
            }
          }
          /* -------------------------------------
              PRESERVE THESE STYLES IN THE HEAD
          ------------------------------------- */
          @media all {
            .ExternalClass {
              width: 100%;
            }
            .ExternalClass,
                  .ExternalClass p,
                  .ExternalClass span,
                  .ExternalClass font,
                  .ExternalClass td,
                  .ExternalClass div {
              line-height: 100%;
            }
            .apple-link a {
              color: inherit !important;
              font-family: inherit !important;
              font-size: inherit !important;
              font-weight: inherit !important;
              line-height: inherit !important;
              text-decoration: none !important;
            }
            .btn-primary table td:hover {
              background-color: #34495e !important;
            }
            .btn-primary a:hover {
              background-color: #34495e !important;
              border-color: #34495e !important;
            }
          }
    </style>
  </head>
  <body class="" style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
    <table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;">
      <tr>
        <td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">&nbsp;</td>
        <td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto; max-width: 580px; padding: 10px; width: 580px;">
          <div class="content" style="box-sizing: border-box; display: block; Margin: 0 auto; max-width: 580px; padding: 10px;">
            <!-- START CENTERED WHITE CONTAINER -->
            <span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">This is preheader text. Some clients will show this text as a preview.</span>
            <table class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #ffffff; border-radius: 3px;">
              <!-- START MAIN CONTENT AREA -->
              <tr>
                <td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;">
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
                    <tr>
                      <th>
                        <img src="http://fusiondiscordbots.com/Email Images/icon.png" height="50px" width="100px">
                        <h1 style="font-family: SinkinSans 300Light; font-size: 250%;">Thanks for applying</h1>
                      </th>
                    </tr>
                    <tr>
                      <td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">
                        <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px; Margin-top: 20px;">Hi [INSERT NAME],</p>
                        <p style="font-family: sans-serif; font-size: 14px; font-weight: normal;">We would like to thank you for your applciation to become a Fusion Customer Support Agent. After carefully reviewing your application, we have decided to <font color="green"><i><b>Accept</b></i></font> your application. We look forward to welcoming you to the team and working with you in the future.</p>
                        <p style="font-family: sans-serif; font-size: 14px; font-weight: normal;">In the next 48 hours, we will send you some information about your role. In this information will be some terms that we require you to accept by emailing us back. Once the terms have been accepted, we will announce your new position to the server and give you your new role.</p>
                        <p style="font-family: sans-serif; font-size: 14px; font-weight: normal;">Well all thats left to say is... Congratulations!</p>
                        <p style="font-family: sans-serif; font-size: 14px; font-weight: normal;">With appreciation,</p>
                        <img src="http://fusiondiscordbots.com/Email Images/seansignature.png" height="50px">
                        <p style="width: 50%;">Sean Hatch<br>
                          Fusion Managing Director</p>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <!-- END CENTERED WHITE CONTAINER -->
            </table>
          </div>
        </td>
      </tr>
    </table>
  </body>
</html>

    

我只是希望能够将这封电子邮件发送给几个人,但我希望它看起来很专业,并在所有电子邮件客户端的中心排列。如果有人可以提供帮助,将不胜感激。 提前致谢, 肖恩。

【问题讨论】:

    标签: html email send


    【解决方案1】:

    我已经成功地将style="text-align: center;" 用作&lt;tr&gt; 元素的内联样式以使内容居中。

    【讨论】:

      【解决方案2】:

      在我在 Litmus 中查看的每个 Apple 和 IOS 电子邮件客户端中,您的电子邮件看起来都很好。徽标和“感谢申请”未在 Yahoo! 中居中邮件。

      最大的问题是您没有正确格式化徽标和签名图形的高度和宽度。

      而不是这个:

      icon.png" height="50px" width="100px"

      这样做:

      icon.png" height="50" width="100"

      Outlook 不理解height="50px",因此图像是电子邮件宽度的大小。该修复并为徽标的表格单元格添加中心标签使您的电子邮件看起来非常适合您的收件人。

      祝 [INSERT NAME] 的新工作好运。

      【讨论】:

      • 是的,我做了 Litmus 测试并发送了一个,效果很好,但是当我尝试通过 Thunderbird 发送它(在中心打开并在中心显示 Thunderbird)时,它会通过右侧的苹果邮件.这是为什么呢?
      • 尝试通过putsmail.com 发送到您的 Apple 浏览器,看看会发生什么。可能是通过 Thunderbird 发送时,它会去除一些 CSS 并导致居中问题。如果您通过 Gmail 等客户端发送电子邮件,就会发生这种情况。不支持的功能不会显示在支持该功能的客户端中。
      • 是的,它可以通过 putsmail 正常工作,但我不想为 putsmail 付费,这就是问题所在。我需要通过某种免费/便宜的服务发送它。
      • Putsmail 目前是用于测试电子邮件的免费服务。它使您可以测试静态电子邮件,而无需发送电子邮件客户端的任何麻烦。如果使用 Thunderbird 发送有效,请执行此操作。发送可能存在一些限制,导致它剥离一些 CSS,就像 Apple Mail、Gmail、Outlook 等一样。
      猜你喜欢
      • 2018-06-21
      • 2013-08-03
      • 2014-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-20
      • 1970-01-01
      相关资源
      最近更新 更多