电子邮件表格图像居中

时间:2018-01-09 12:38:16

标签: html css

我的图像位于表格单元格中。我尝试过使用text-align: left,但是当您通过电子邮件发送图片时,图片仍然居中。

.tg  {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;}
.tg .tg-yw4l {
    vertical-align: top;
}
img {max-width:100%;}
@media screen and (max-width: 767px) {.tg {width: auto !important;}.tg col {width: auto !important;}.tg-wrap {overflow-x: auto;-webkit-overflow-scrolling: touch;}}
<div class="tg-wrap">
    <table class="tg">
        <tr>
            <th class="tg-yw4l">
                <a href="http://www.highprofile-properties.co.uk/"><img src="https://i.imgur.com/ap6gok8.png"></a>

            </th>
            <th class="tg-yw4l">
                <img src="https://i.imgur.com/5YgxaJ3.png" style="margin-top: 5px;margin-bottom:25px;"><br>
                <img src="https://i.imgur.com/hYv3F1R.png" style="margin-bottom:5px;"><br>
                <img src="https://i.imgur.com/hYv3F1R.png" style="margin-bottom:5px;"><br>
                <img src="https://i.imgur.com/acXC4op.png" style="margin-bottom:5px;"><br>
                <img src="https://i.imgur.com/uQVx0nh.png">
            </th>
        </tr>
        
    </table>
    <div style="max-width:600px;font-family:Arial, sans-serif;font-size:12px;color:#838383;">
    <p>The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by any other person is not permitted. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.</p>
    </div>
</div>

任何人都知道如何使它们保持对齐?

1 个答案:

答案 0 :(得分:1)

你可以试试这个:

img {max-width:100%; float: left;}

.tg  {border-collapse:collapse;border-spacing:0; text-align: left;}