html - 表格单元格中的列表彼此重叠

标签 html css

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/

相关文章:

html - 链接到部分页面减去导航栏高度

html - 如何在文本区域中设置最大值?

css - 搁置内容

jquery - 使用 animate() 从底部向上滑动

html - 如何在选择中内联选项标签并使用 optgroup 划分它们?

javascript - Chrome 的 .resize() 的替代方案?

html - 图像路径无法正常工作

html - 用户向下滚动时重复表头

html - 字段集和图例标签在 asp.net mvc 中不起作用

JQuery fadeIn() 在 fadeIn() 上移动其他 CSS 元素