[英]How to align multi-line text in an <ul> not with the bullet point, but with the text above?
[英]How to align the second line in HTML Bullet point list
我的第二個要點“整個系列中啟用 WiFi 的功能”在Outlook email上未對齊。 第二行以“整個”開頭,但它向右縮進,並且沒有與項目符號點完全對齊。 我怎樣才能解決這個問題?
<tbody> <tr> <td style="width: 12%; padding: 0px;" class="hide_on_mobile"> </td> <td style="width: 66.1667%; text-align: center; padding: 0px 10px 15px;" class="adonmobile2"> <ul> <li style="color: #090a0a; margin: 10px; padding: 0px; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">Premium-grade stainless-steel interiors</span></li> <li style="color: #090a0a; margin: 10px; padding: 0px; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">WiFi-enabled capabilities across the entire collection</span></li> <li style="color: #090a0a; margin: 10px; padding: 0px; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">Award-winning theater-style lighting</span></li> <li style="color: #090a0a; margin: 10px; padding: 0px; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">Thermador exclusive Diamond Ice</span></li> <li style="color: #090a0a; margin: 10px; padding: 0px; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">Intuitive Push-to-Open doors</span></li> </ul> </td> <td style="width: 18.8333%; padding: 0px;" class="hide_on_mobile"> </td> </tr> </tbody>
對我有用的 4 個步驟:
您需要重置默認值(邊距、填充),並為 Outlook 使用“text-indent”,注意您應該只在<li>
元素上使用 margin-left。 如果需要,您還可以向<li>
添加頂部和底部邊距(但根本不要使用填充 - 它在 email 環境中不會保持一致)。
<html>
<head>
<!--[if gte mso 9]>
<style>
li {
text-indent:-1em;
}
</style>
<![endif]-->
</head>
<body>
<table width="400">
<tbody>
<tr>
<td style="width: 12%; padding: 0px;" class="hide_on_mobile"> </td>
<td style="width: 66.1667%; text-align: center; padding: 0px 10px 15px;" class="adonmobile2">
<ul style="margin:0;padding:0;">
<li style="color: #090a0a; margin:0 0 0 30px;padding:0; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">Premium-grade stainless-steel interiors</span></li>
<li style="color: #090a0a; margin:0 0 0 30px;padding:0; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">WiFi-enabled capabilities across the entire collection</span></li>
<li style="color: #090a0a; margin:0 0 0 30px;padding:0; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">Award-winning theater-style lighting</span></li>
<li style="color: #090a0a; margin:0 0 0 30px;padding:0; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">Thermador exclusive Diamond Ice</span></li>
<li style="color: #090a0a; margin:0 0 0 30px;padding:0; font-family: Avenir, Arial, san-serif; line-height: 150%; text-align: left;"><span class="font" style="color: #000000; font-size: 18px;">Intuitive Push-to-Open doors</span></li>
</ul>
</td>
<td style="width: 18.8333%; padding: 0px;" class="hide_on_mobile"> </td>
</tr>
</tbody>
</table>
</body>
</html>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.