表格单元格换行(有时)

发布于 2024-10-08 11:09:48 字数 386 浏览 0 评论 0原文

有一个表格,其中一行中的最后一个单元格有时会换行,但在其他情况下会正确显示。在我的一生中,看不出它包裹和不包裹的情况有什么区别。

包装

http://bookgroupaustralia.obiweb.com.au/Book/guitar-chords

不换行

http://bookgroupaustralia.obiweb.com.au/Book/save

Have a got a table where the last cell in a row sometimes wraps but in other occasions displays correctly. Can't for the life of me see any difference between cases where it wraps and when it doesn't.

wrapping

http://bookgroupaustralia.obiweb.com.au/Book/guitar-chords

not wrapping

http://bookgroupaustralia.obiweb.com.au/Book/save

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

記柔刀 2024-10-15 11:09:48

您似乎在 td 元素上设置 float: left; ,这显然改变了它们的显示类型并允许它们在某些情况下换行。这是有原因的吗?您可以尝试从 /site/css/style.css (第 474 行)中删除它

.listing ul li.productItem, .listing ul li.productItemLast, td.productItem
{
float: left;

You appear to be setting float: left; on the td elements, which is apparently changing their display type and allowing them to wrap in some cases. Is there a reason for that? You may simply try removing it, from /site/css/style.css (line 474)

.listing ul li.productItem, .listing ul li.productItemLast, td.productItem
{
float: left;
梦里梦着梦中梦 2024-10-15 11:09:48

更改 td.productItem margin-right: 10px;至 5 像素;

Change td.productItem margin-right: 10px; to 5px;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文