HTML电子邮件的左对齐图像问题

问题描述 投票:0回答:1

[编码和学习如何创建HTML电子邮件的新手。我选择了一封随机电子邮件并尝试复制它。

我正在尝试将Google图片与Apple Play商店图片对齐,并将社交媒体图标全部放在左侧。

我已经搜索了W3,Google和Stack Overflow。我尝试添加填充。

谢谢您的协助。

                         <tr>
                            <td>
                                <img src="/img/applestorelogo.png" width="auto" height="24" style=" display: inline-block;" alt="applestorelogo"/>
                            </td>
                            <td>
                                <img src="/img/googlestore.png" width="auto" height="24" alt="googlestore"/>
                            </td>
                            <td><img src="/img/fb.png" width="auto" height="24"  alt="facebook"/>
                            </td>
                            <td><img src="/img/IG.png" width="auto" height="24" alt="instagram"/>
                            </td>
                            <td><img src="/img/twitter.png" width="auto" height="24" alt="twitter"/>
                            </td>
                        </tr>

下面是image

html css html-email
1个回答
0
投票

我认为您应该只使用三个<td>

以下是您的方案的想法。您可能需要根据布局更改宽度:

<table border="1" style="width:50%">
<tr>
    <td style="text-align: center; width: 5%;">
        <img src="/img/applestorelogo.png" width="auto" height="24" alt="applestorelogo"/>
    </td>
    <td style="text-align: center;width: 5%;">
        <img src="/img/googlestore.png" width="auto" height="24" alt="googlestore"/>
    </td>
    <td style="text-align: right;">
        <img src="/img/fb.png" width="auto" height="24"  alt="facebook"/>  
        <img src="/img/IG.png" width="auto" height="24" alt="instagram"/>  
        <img src="/img/twitter.png" width="auto" height="24" alt="twitter"/>
    </td>
</tr>
</table>
© www.soinside.com 2019 - 2024. All rights reserved.