[英]set column Widths for Bootstrap Responsive Table in Repeat Control
I have a repeat control and for each row I want to set up a bootstrap responsive table. 我有一个重复控件,我想为每一行建立一个引导响应表。 Right now it looks something like this: 现在看起来像这样:
the problem is that I would like to set the column widths so they line up better. 问题是我想设置列宽,以便它们更好地对齐。 I have tried to do a two row grid but the two rows collapse nicely but then the data is not under the Label. 我尝试做一个两行网格,但两行很好地折叠,但是数据不在Label下。 I have tried class="width:200px" or used % as well in the div but that seems to have no impact. 我已经尝试过class =“ width:200px”或在div中也使用%,但这似乎没有任何影响。 Like wise if added to the of the . 如果添加到,则同样明智。
I would settle for a grid or responsive table solution. 我会选择一个网格或响应表解决方案。 my code looks something like this: 我的代码看起来像这样:
<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>
First: you used class
attributes to set style
values. 首先:您使用class
属性来设置style
值。 If you change to style
then it should work. 如果您更改style
则应该可以使用。 I recommend you to use a colgroup though. 我建议您虽然使用colgroup。 http://www.w3schools.com/tags/tag_colgroup.asp http://www.w3schools.com/tags/tag_colgroup.asp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.