【发布时间】:2013-03-08 12:15:52
【问题描述】:
我制作了一个表格,并希望第一个单元格从右开始,而不是默认从左开始。 我尝试更改 CSS 中的 float 属性,但似乎没有帮助。 代码如下:
<table border="0" width="100%" cellspacing="0" align="center" class="result_table">
<tr align="right">
<th bgcolor="#cccccc" align="right">1</th>
<th bgcolor="#cccccc" size="17">2</th>
<th bgcolor="#cccccc">3</th>
<th bgcolor="#cccccc">4</th>
</tr>
</table>
<style>
table.result_table {
float:right;
}
</style>
谁能建议一种方法来改变这张桌子的浮动?
【问题讨论】:
-
你想改变什么?第一个单元格的内容?
-
为什么不使用
direction:ltr;作为单元格? -
将表格方向更改为
rtlinsted offloat -
感谢 rtl 完美运行。!
标签: html css html-table right-to-left