2
我在表中浮动标题有问题。我的标题应该是colspan="2"
,但是当我将float:left
设置为td元素“标题”时,colspan停止工作。我想是这样的:表和浮动
+-------------------------------------------------+
|Header headher header header |
+-------------------------------------------------+
|Something | Something |
+-------------------------------------------------+
但我得到这个:
我的代码:
<table border="1">
<thead>
<tr>
<th colspan="2" style="float: left;">Header header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Something</td>
<td>Something</td>
</tr>
</tbody>
</table>
所以不要浮动......问题解决:) – CyberDude 2012-04-10 20:00:12
但它似乎中心。如何将它移动到左侧? – sundaysloth 2012-04-10 20:04:39
你的意思是里面的文字居中?使用'style =“text-align:left;”'而不是浮动。 – CyberDude 2012-04-10 20:06:00