我需要将表格单元格中的 anchor 标记对齐到顶部,表格单元格包含一个文本区域。我的代码如下,但 anchor 标记与文本区域的底部对齐。
<style>
td {
border:#777 1px solid; vertical-align:top;
}
textarea {
height:100px; width:300px;
}
</style>
<table>
<tr>
<td>Message:</td>
<td>
<textarea></textarea>
<a href="javascript:" title="Required">*</a>
</td>
</tr>
</table>
如何将该 anchor 标记垂直对齐到单元格顶部?
最佳答案
也为 anchor 顶部垂直对齐:
td a {
vertical-align: top;
}
关于html - CSS,垂直对齐表格单元格中的 anchor ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19332159/