表格单元格中文本的垂直对齐 [英] Vertical Alignment of text in a table cell

查看:145
本文介绍了表格单元格中文本的垂直对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是表格的一部分(它是一个表单):

Here's a portion of my table (it's a form):

这些只是两个< td> c>< tr> 。我想尝试将描述向上移动到表格顶部,而不是放在底部。

Those are just two <td>'s in a <tr>. I'm trying to get Description up top, to the top of the table cell, rather than resting on the bottom.

我如何这样做?

推荐答案

td.description {vertical-align: top;}

其中描述 c $ c> td 中的文字

where description is the class name of the td with that text in it

<td class="description">Description</td>

或inline(yuk!)

OR inline (yuk!)

<td style="vertical-align: top;">Description</td>

这篇关于表格单元格中文本的垂直对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆