我的图像在表格单元格中居中。我试过使用 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>
谁知道如何让它们左对齐?
最佳答案
你可以试试这个:
img {max-width:100%; float: left;}
或
.tg {border-collapse:collapse;border-spacing:0; text-align: left;}
关于html - 电子邮件表格图像居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48168407/