【发布时间】:2015-07-29 06:36:50
【问题描述】:
所以我有一个宽表,在 Chromium 的最新版本中显示有点错误。 37 版可以正确渲染,44 版则不能。
问题是最后一列不包含在table/thead/tbody宽度中。所以标题比它应该的要窄。如果我设置table-layout:fixed,这个错误就会消失,但我必须使用auto。
看起来像一个铬错误,但无论如何,有解决方法吗?
JsFiddle以下:
table,
th,
td {
border: 1px solid black;
border-collapse: collapse;
}
th,
td {
padding: 5px;
}
<table>
<caption style="background: lightgreen;">
Caption
</caption>
<thead>
<tr>
<th>
Title
</th>
<th>
Description
</th>
<th>
Lorem Ipsum
</th>
<th>
Lorem Ipsum
</th>
<th>
Actions
</th>
<th>
Actions
</th>
<th>
Actions
</th>
<th>
Actions
</th>
<th>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Lorem ipsum dolor sit amet
</td>
<td>
<span>Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Vestibulum dignissim mauris vel auctor
dapibus. Morbi scelerisque interdum magna, sed pulvinar
libero fringilla quis. Vivamus maximus lorem tempor
nibh eleifend, ac euismod velit dictum.</span>
</td>
<td>qwe</td>
<td>qwe</td>
<td>qwe</td>
<td>qwe</td>
<td>qwe</td>
<td>qwe</td>
</tr>
</tbody>
</table>
</body>
</html>
【问题讨论】:
-
看起来如果我们看不到代码,我们看不到问题。我们不是巫师或女巫。
-
糟糕,添加了 jsfiddle。
-
您解释的情况与小提琴不同,请您输入正确的代码并根据小提琴向我们展示问题
-
@misterManSam 是的,这正是我要说的。
标签: html css google-chrome chromium