我的表的开始如下,但是,列宽除了我要指定的内容以外都没有。有什么想法吗?
如果我添加以下内容,则所有列均会平均分配,而是具有我要指定的宽度
table {
table-layout: fixed;
word-wrap: break-word;
}
代码
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th colspan="3" class="info" style="width:800px !important;"></th>
<th colspan="18" class="text-center success" style="border-bottom:1px black solid !important; width: 1800px !important;">Actuals</th>
</tr>
<tr>
<th rowspan="2" class="info" style="width:100px !important;"></th>
<th rowspan="2" class="info" style="width:100px !important;">Measure Type</th>
<th rowspan="2" class="info border-right" style="width:600px !important;">Measure</th>
<th colspan="3" class="success border-right border-bottom" style="width:300px !important;">October 18</th>
<th colspan="3" class="success border-right border-bottom" style="width:300px !important;">November 18</th>
<th colspan="3" class="success border-right border-bottom" style="width:300px !important;">December 18</th>
<th colspan="3" class="success border-right border-bottom" style="width:300px !important;">January 19</th>
<th colspan="3" class="success border-right border-bottom" style="width:300px !important;">February 19</th>
<th colspan="3" class="success border-right border-bottom" style="width:300px !important;">March 19</th>
</tr>
<tr class="success">
<th class="border-bottom border-right" style="width:100px !important;">Target</th>
<th class="border-bottom border-right" style="width:100px !important;">Actual</th>
<th class="border-bottom border-right" style="width:100px !important;">RAG Status</th>
<th class="border-bottom border-right" style="width:100px !important;">Target</th>
<th class="border-bottom border-right" style="width:100px !important;">Actual</th>
<th class="border-bottom border-right" style="width:100px !important;">RAG Status</th>
<th class="border-bottom border-right" style="width:100px !important;">Target</th>
<th class="border-bottom border-right" style="width:100px !important;">Actual</th>
<th class="border-bottom border-right" style="width:100px !important;">RAG Status</th>
<th class="border-bottom border-right" style="width:100px !important;">Target</th>
<th class="border-bottom border-right" style="width:100px !important;">Actual</th>
<th class="border-bottom border-right" style="width:100px !important;">RAG Status</th>
<th class="border-bottom border-right" style="width:100px !important;">Target</th>
<th class="border-bottom border-right" style="width:100px !important;">Actual</th>
<th class="border-bottom border-right" style="width:100px !important;">RAG Status</th>
<th class="border-bottom border-right" style="width:100px !important;">Target</th>
<th class="border-bottom border-right" style="width:100px !important;">Actual</th>
<th class="border-bottom border-right" style="width:100px !important;">RAG Status</th>
</tr>
</thead>