为什么我的列表在表格单元格之外



我有一个列表,当使用相同的CSS时,它在一个表中看起来很好,但在一秒钟内就不好了。

它在这个网页上运行良好:http://c5d.co.uk/kimmeridge1911.php

但在这一页上,文本超出了框。http://c5d.co.uk/infirmary1911.php

HTML是

.birthplace {
margin: 0 auto;
padding: 0;
list-style: none;
counter-reset: section;
line-height: 1.2;
text-align: left;
font-size: small;
width: 90%;
}
.birthplace li span {
display: block;
text-indent: 15px;
}
.birthplace li:before {
counter-increment: section;
content: "("counter(section)")";
margin-right: 5px;
}
.birthplace span {
text-align: left;
display: block;
margin-left: 5%
}
<td rowspan="3">
<ul class="birthplace">
<li>If born in the United King&#45;<span class="rightindent">dom&#44; write the name of the</span><span class="rightindent">County&#44; and Town or Parish&#46;</span></li>
<li>If born in any other part of<span class="rightindent">the British Empire&#45; write</span><span class="rightindent">the name of the Dependency&#44;</span><span class="rightindent">Colony&#44; etc&#46;&#44; and of the</span><span class="rightindent">Province or State&#46;</span></li>
<li>If born in a Foreign Country&#44;<span class="rightindent">write the name of the Country&#46;</span></li>
<li>If born at sea&#44; write &ldquo;At Sea&#46;&rdquo;</li>
</ul>
<p class="birthplaceblock1911">NOTE&#46;&mdash;In the case of persons<span>born elsewhere than in England or</span><span>Wales&#45; state whether &ldquo;Resident&rdquo; or</span><span>&ldquo;Visitor&rdquo; in this Country&#46;</span></p>
</td>

如果我去掉页边空白,那么它在一页中运行良好,但会将列表发送到第一页的左侧。

无论如何,我认为表单元格应该展开,以接受项目的文本。

有人能帮忙吗?

我知道我需要第二个从第3号开始的列表,但我可以处理这个。

感谢

我建议您可能应该检查是否将表放在div中。因为可能文本与div绑定,并且div比表大。

这个解决方案在我的网站上运行,https://www.tradebyb.com

编辑:可以将div或表或列表的左边距设置为0。

最新更新