I want to place text at center and at the bottom of the cell in table.How can i do this?
我想把文本放在桌子中心和底部的文本中。我怎么能这样做?
This is what i want:
这就是我要的:
2 个解决方案
#1
31
CSS:
CSS:
td {vertical-align:bottom;text-align:center;}
example: http://jsfiddle.net/vKPG8/
示例:http://jsfiddle.net/vKPG8/
#2
2
valign="bottom" might work.
valign =“bottom”可能有用。
http://www.w3schools.com/tags/att_td_valign.asp
http://www.w3schools.com/tags/att_td_valign.asp
But I think that's deprecated.
但我认为这已被弃用了。
So you should do it in CSS with:
所以你应该在CSS中用它来做:
<td style="vertical-align:bottom;">your text</td>
#1
31
CSS:
CSS:
td {vertical-align:bottom;text-align:center;}
example: http://jsfiddle.net/vKPG8/
示例:http://jsfiddle.net/vKPG8/
#2
2
valign="bottom" might work.
valign =“bottom”可能有用。
http://www.w3schools.com/tags/att_td_valign.asp
http://www.w3schools.com/tags/att_td_valign.asp
But I think that's deprecated.
但我认为这已被弃用了。
So you should do it in CSS with:
所以你应该在CSS中用它来做:
<td style="vertical-align:bottom;">your text</td>