嵌套表格之间是否应该有任何水平空间
我想我已将所有填充、边距、边框间距等设置为 0,但我在另一个表中有一个嵌套表,并且有一个非常小的(但可见)水平空间。
我知道这一点是因为嵌套表格的背景色是蓝色,顶部表格的背景色是白色,我可以看到表格的右侧和左侧有一条白色线。
有什么办法解决这个问题吗?
I think I have set all padding, margin, border-spacing, etc to 0 but I have a nested table within another table and there is a very tiny (but visible) horizontal space.
I know this as the backcolor of the nested table is blue and the backcolor of the top table is white and I can see a line of white to the right and left of the table.
Is there any way around this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我并不是想在这里陷入哲学上的“反表”辩论,但您可能想退后一步,重新考虑嵌套表是否是您在这种情况下真正应该使用的...
如果您正在显示表格数据并且某些单元格需要包含多行/列,您可能需要考虑在单个表格中的普通表格单元格上使用
colspan
和rowspan
属性。或者,如果您使用表格来呈现页面的视觉布局,您可能需要考虑使用基于 CSS 的方法来实现。
I don't mean to jump into a philosophical "Anti-Table" debate here, but you might want to step back and reconsider if nesting tables are what you really should be using in this situation...
If you are displaying tabular data and certain cells need to contain multiple rows/columns, you might want to look into using the
colspan
androwspan
attributes on normal table cells within a single table.Alternatively, if you're using the tables to render the visual layout of the page, you may want to look into doing it with CSS-based methods.
您是否尝试过将表格的 cell-padding 和 cell-spacing 属性设置为 0
这就是您的意思
have you tried setting the cell-padding and cell-spacing properties of the table to 0
Is that what you meant by