【问题标题】:Why does my td height doesn't seem to adjust?为什么我的 td 高度似乎没有调整?
【发布时间】:2018-03-05 20:29:54
【问题描述】:

我一直在为电子邮件模板创建表格。我想降低我的 TD 的高度,但不能

注意:两个 td 的 rgb(41,62,151) bg 颜色,5% 宽度,colspan 为 2,100px 高度,我无法减小。

 

<table cellpadding="0" cellspacing="0" style="text-align: center; width: 100%; font-size: 10pt; border-collapse: collapse">
<tbody style="margin: 0">

<tr>
<td colspan="14" style="background-color: rgb(41, 62, 151); border-bottom-color: rgb(41, 62, 151)">
<img src="an image here">
</td>
</tr>

<tr>
<td colspan="2" style="background-color: rgb(41, 62, 151); height: 100px; width: 5%">
<br>
</td>

<td colspan="10" style="background-color: white; height: 350px; width: 90%; 
padding: 30px 100px">
<p style="text-align: justify"><span style="color: rgb(42, 61, 151); font-
family: Callibri, Geneva, sans-serif; font-size: large; text-align: left">some text here</span><b style="color: rgb(42, 61, 151); font-family: 
Callibri, Geneva, sans-serif; font-size: large; text-align: left">&nbsp;</b>
</p><p style="text-align: justify">
<font color="#283e97">text here</font><br>some text here<br><br><span 
style="color: rgb(40, 62, 151)">some text here<br><br><span style="color: 
rgb(40, 62, 151)">

some text here</span><br>Some text here</p>
</td>

<td colspan="2" style="background-color: rgb(41, 62, 151); height: 100px; width: 5%">
<br>
</td>

</tr>


</tbody>
</table>

任何帮助表示赞赏!提前致谢

【问题讨论】:

    标签: html css html-table height


    【解决方案1】:

    许多电子邮件客户端的 CSS 支持有限,因此样式属性可能没有任何效果。尝试使用 td 的 height 属性。

    <td height="100px">...</td>
    

    【讨论】:

    • hmm 我已经尝试过要调整的两个 td 中的 height 属性,但它似乎仍然不起作用。
    猜你喜欢
    • 1970-01-01
    • 2013-03-13
    • 1970-01-01
    • 2011-08-12
    • 2011-02-27
    • 2018-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多