【发布时间】:2016-10-26 06:30:23
【问题描述】:
我有以下布局。
<style>
table { width: 200px; white-space: nowrap; table-layout: fixed; }
.a { width:10px; overflow: hidden; text-overflow: ellipsis }
.b { width:190px; overflow: hidden; text-overflow: ellipsis }
</style>
<table border="1" style="">
<tr>
<td colspan="2">Some content header goes in here</td>
</tr>
<tr>
<td class="a">This cells has more content</td>
<td class="b">Less content here</td>
</tr>
</table>
我正在尝试设置固定表格布局并在每列上具有固定宽度,但是,由于我在固定列上方有colspan,因此我无法设置宽度。我怎样才能做到这一点?
【问题讨论】:
标签: css html-table