Code here (too long to post in here)
为了轻松组织我想并排显示的元素,我使用表格行,例如:
<--!I know this isn't very professional but I don't care-->
<table>
<tr>
<td><p>Here's a thing</p></td>
<td><p>Here's another thing</p></td>
</tr>
<tr>
<td><p>More thing</p></td>
<td><p>still more thing</p></td>
</tr>
</table>
这显示为:
Here's a thing | Here's another thing
More thing | Still more thing
但是,当表格单元格中有列表及其项时,这会给我带来奇怪的错误,列表项彼此重叠(您可以在 JSBin 中看到)。有办法解决吗?
编辑:还有一些其他问题(随机元素符号、没有元素符号的元素(可能是随机元素符号)、元素符号样式与其他元素符号样式不同的单个列表,等等)但这个问题最让我烦恼
最佳答案
正如 AndyM 所说,您可以通过删除点来避免这种情况,或者如果您仍想保持列表的外观,则可以对其应用 list-style-property:
list-style-property: inside;
这应该正确对齐它们,同时看起来仍然像列表。
关于html - 表格单元格中的列表彼此重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23985016/