我有一个html,我想要一个特定的单元格左对齐。下面是代码和小提琴链接。
HTML:
<section class="tr_chapter">
<div class="chapter"><a name="HKWBV1_ORD_89"></a>
<div class="toc">
<div class="toc-part">
<table class="toc-div">
<tbody>
<tr>
<td>
<table class="toc-item-third-level">
<tbody>
<tr>
<td></td>
<td class="toc-item-num-left"><span class="font-style-bold">Contents</span></td>
<td class="toc-title"></td>
<td class="toc-pg"><span class="font-style-italic">para.</span></td>
</tr>
<tr>
<td>4/0/1</td> <td class="toc-item-num-left">1.</td>
<td class="toc-title">Companies (O.4, r.2)</td>
<td class="toc-pg"><a href="4/2">4/2</a></td>
</tr>
<tr>
<td></td>
<td class="toc-item-num-left">2.</td>
<td class="toc-title">Consolidation, etc., of causes or matters (O.4, r.9)</td>
<td class="toc-pg"><a href="4/9">4/9</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
我想要输出如下图所示。即数字(4/0/1)。请让我知道我该怎么做。
感谢
答案 0 :(得分:3)
如果您希望左边对齐数字4/0/1的单元格,只需将align="left"
提供给父标记,或者添加一个text-align:left;
请参阅:jsfiddle