Bootstrap 3 表,使用滚动条以 px 为单位设置固定列宽 [英] Bootstrap 3 table, set fixed column width in px with scrollbar
问题描述
在我的 Bootstrap 3 项目中,我需要一个以 px 为单位的固定列宽的表格.我的表中的每个 I need a table with fixed column widths in px on my Bootstrap 3 project. Every 请帮忙! 您可以指定一个 You could specify a ... 然后在 CSS 中设置列的宽度: ... and then set the width of your columns in CSS: 如果您在 table 元素上使用 bootstrap If you are using the bootstrap 请参阅此 jsfiddle. 这篇关于Bootstrap 3 表,使用滚动条以 px 为单位设置固定列宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! 都有
style=##px
但它没有分配它.我试过将 style="width:auto; overflow: scroll;"
添加到表格中,但它不起作用.还尝试删除我桌子上的每个班级,但列不会增长.
<th>
in my table <table id="items" class="table table-striped table-condensed">
has style=##px
but its not assigning it. I've tried adding style="width:auto; overflow: scroll;"
to the table but it does't work. Also tried removig every class on my table but colums wont grow.推荐答案
部分:<colgroup>
section:<table>
<colgroup>
<col span="1">
<col span="1">
</colgroup>
...
</table>
col {
width:200px;
}
.table
类,您还需要将表格的宽度设置为 auto
..table
class on the table element, you will also need to set the width of your table to auto
.
登录
关闭