現在一直在努力解決這個問題,這真的讓我很煩惱。基本上我有一些我一直在研究的電子郵件模板,它們在所有客戶端(Litmus 測驗)上都可以正常作業,除了專門在 iOS 上的 Gmail,Android 也可以正常作業。我遇到的問題是我希望我所有的表格都是 100% 寬度,所以它們的大小都相同,但是 gmail 似乎根據里面的內容調整表格的大小。
這是我的代碼的一部分:
<tr class="module bg-white" style="background-color:#fff;color:#23282b">
<td>
<table class="container" cellpadding="0" cellspacing="0" border="0" role="presentation" width="100%"
style="margin:0 auto;width:100%!important;max-width:600px!important">
<tr>
<td class="card-wrapper" align="center" valign="top" style="padding:0 15px 10px">
<table cellpadding="0" cellspacing="0" border="0" role="presentation" width="100%">
<tr>
<td class="card-content bg-white border-lightgray"
style="padding:30px 20px 20px;background-color:#fff;color:#23282b;border:solid 1px #eee">
<h2
style="font-family:GTAmerica-Regular,Helvetica,Arial,sans-serif;margin:0 0 20px;font-size:18px;font-weight:700;line-height:22px">
YOUR DELIVERY DETAILS</h2>
<table class="delivery-details" cellpadding="0" cellspacing="0" border="0"
role="presentation" width="100%"
style="width:100%!important;max-width:600px!important">
<tr>
<td style="vertical-align:top;padding-right:8.5px;padding-left:0">
<h3
style="font-family:GTAmerica-Regular,Helvetica,Arial,sans-serif;margin:0 0 15px;font-size:16px;font-weight:700;line-height:22px">
Delivery Service</h3>
</td>
<td style="vertical-align:top;padding-right:0">
<p
style="font-family:GTAmerica-Regular,Helvetica,Arial,sans-serif;margin:0 0 10px;font-size:16px;font-weight:400;margin-bottom:15px;line-height:22px">
Next Day</p>
</td>
</tr>
<tr>
<td style="vertical-align:top;padding-right:8.5px;padding-left:0">
<h3
style="font-family:GTAmerica-Regular,Helvetica,Arial,sans-serif;margin:0 0 15px;font-size:16px;font-weight:700;line-height:22px">
Delivery Address</h3>
</td>
<td style="vertical-align:top;padding-right:0">
<p
style="font-family:GTAmerica-Regular,Helvetica,Arial,sans-serif;margin:0 0 10px;font-size:16px;font-weight:400;margin-bottom:15px;line-height:22px">
Fake Name <br>Fake House <br>Fake Street
<br>Fake Town <br>UK <br>Fake Postcode</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
在我的手機上看起來是這樣的:
iOS 15 gmail 上的電子郵件結果
有沒有什么辦法解決這一問題?在所有其他客戶端上,它擴展到 100% 沒問題,謝謝!
uj5u.com熱心網友回復:
這聽起來可能是由于這個錯誤,Gmail向s 和s添加了一個.munged類。<table><td>width:auto!important
一個解決方案是min-width:100%為每個可能受影響<table>的人添加一個。<td>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/436923.html
