【发布时间】:2015-04-08 18:41:01
【问题描述】:
我需要能够覆盖已定义垂直对齐的 td 标记内的图像的垂直对齐。 我尝试给图像垂直对齐:中间,虽然这在 ff 中有效,但图像仍然低于 chrome 中的线。 html 是通过 bbcode 编辑器提供的。
<table>
<tr>
<td style="vertical-align: top">
The text in table cell needs to align to top
<br/>
<br/>
image should vertically center relative to line <img src="https://jsfiddle.net/img/logo.png"/>
</td>
</tr>
td {
border: 1px solid blue;
height: 200px;
}
td img {
vertical-align: middle;
}
适用于 Firefox,但不适用于 chrome。
【问题讨论】:
标签: html css google-chrome