How to align all elements in the tr to the left side of the table?
I have a table with couple inputs and button on the last row. I want to align them all to the left side. Is it possible to apply float:left to all tr ? also I want it work for IE :)
I have:
<tab开发者_C百科le>
<tbody>
<tr>
<th> </th>
<td> </td>
</tr>
</tbody>
</table>
Does this not work?
<tr>
<td style="text-align:left">html here</td>
</tr>
That should align all elements to the left. If the table looks funny, make sure you don't need to use colspan
.
Apply text-align to your desired cells..
To do all cells do this:
td, th {text-align:left}
Yes you can apply it to the entire row. text-align:left
would do the trick I think.
<table>
<tbody>
<tr style="float:left">
<th> </th>
<td> </td>
</tr>
</tbody>
</table>
精彩评论