电子邮件的 HTML:我需要在表格中间显示图像,而不是在顶部

问题描述 投票:0回答:1
html email
1个回答
0
投票

要通过图像实现您所需要的效果,只需进行一个小修复即可。

    <!-- ... [earlier code] ... -->
<table align="center" border="0" cellpadding="0" cellspacing="0" class="container h-auto" height="300" width="600">
  <tr>
    <td align="center" valign="middle"> <!-- valign="middle" added here -->
      <!--LEFT-->
      <table align="left" border="0" cellpadding="0" cellspacing="0" class="container" width="300">
        <tr>
          <td align="center" valign="middle" width="100%"> <!-- valign="middle" added here -->
            <a alias="Body-Image" conversion="false" data-linkto="https://" href="[link goes here]" style="color: #000000; font-family: sans-serif;text-align: center; text-decoration: none; display: block;">
              <img alt="[add alt text here]" class="content-image" src="https://dummyimage.com/300x100" style="display: block;width:100%" width="300"> 
            </a>
          </td>
        </tr>
      </table>
      <!--//LEFT-->
      <!-- [rest of your code] ... -->
    </td>
  </tr>
</table>
<!-- ... [later code] ... -->
© www.soinside.com 2019 - 2024. All rights reserved.