在重复控制中为Bootstrap响应表设置列宽度

时间:2015-10-13 20:32:19

标签: html twitter-bootstrap xpages

我有一个重复控件,每行我想设置一个bootstrap响应表。现在它看起来像这样: enter image description here

问题是我想设置列宽,以便它们更好地排列。我试图做一个两行网格,但两行很好地崩溃,但然后数据不在标签下。我尝试过class =" width:200px"或者在div中使用%,但似乎没有影响。如果添加到的话,就像明智一样。

我会选择网格或响应式表解决方案。 我的代码看起来像这样:

<div class="table-responsive">
                    <table class="table  table-bordered table-condensed " style="width:900px">
    <thead>
        <tr >
            <th class="width:150px">Label</th>
            <th class="width:250px">Default Approvers</th>
            <th class="width:75px">Auto Process</th>
            <th class="width:75px">Routing</th>
            <th class="width:75px">Post Approval</th>
            <th class="with:75px">Post Denial</th>
            <th class="width:50px">Notify Late</th>
        </tr>
    </thead>
    <tbody>
       <tr>
          <td>
.
.
.
</tbody>

1 个答案:

答案 0 :(得分:0)

首先:您使用class属性设置style值。如果您更改为style,那么它应该有效。 我建议你使用colgroup。 http://www.w3schools.com/tags/tag_colgroup.asp

相关问题