为什么我的 <table> 会这样?
Why is my <table> behaving this way?
我遇到了两个 td 的内容彼此不一致的问题。我无法在 Fiddle: https://jsfiddle.net/5cyrtv2d/ 中复制它。奇怪。
这是我的代码:
<tr>
<td>
<img src="images/Affiliations/aaa.logo_.color_.jpg" />
</td>
<td>
<div class="contactContent">
AAA is a federation of 51 independently operated motor clubs throughout North America. AAA is a not-for-profit member service organization with more than 51 million members. They provide services to its members such as travel, automotive, insurance, financial, and discounts. AAA Approved Auto Repair facilities have been thoroughly inspected and are tested annually to ensure they meet – and often surpass – the stringent, demanding quality service criteria established by AAA.
</div>
</td>
</tr>
这是渲染输出:
"contactContent" 的 class 与发生的事情无关 - 我删除了 class,它仍然像上面那样呈现。但是,当我用文本替换图像时,一切都符合我的预期。
问题出在我的 reset.css 上。我有垂直对齐:基线;设置应用于我的 table/cells/rows,这导致了问题。删除它,现在一切正常。
我遇到了两个 td 的内容彼此不一致的问题。我无法在 Fiddle: https://jsfiddle.net/5cyrtv2d/ 中复制它。奇怪。
这是我的代码:
<tr>
<td>
<img src="images/Affiliations/aaa.logo_.color_.jpg" />
</td>
<td>
<div class="contactContent">
AAA is a federation of 51 independently operated motor clubs throughout North America. AAA is a not-for-profit member service organization with more than 51 million members. They provide services to its members such as travel, automotive, insurance, financial, and discounts. AAA Approved Auto Repair facilities have been thoroughly inspected and are tested annually to ensure they meet – and often surpass – the stringent, demanding quality service criteria established by AAA.
</div>
</td>
</tr>
这是渲染输出:
"contactContent" 的 class 与发生的事情无关 - 我删除了 class,它仍然像上面那样呈现。但是,当我用文本替换图像时,一切都符合我的预期。
问题出在我的 reset.css 上。我有垂直对齐:基线;设置应用于我的 table/cells/rows,这导致了问题。删除它,现在一切正常。