Hy guys! ! У меня есть этот образ:Тот же размер для заголовков и данных
Я хочу, чтобы изменить размер первого столбца до минимального размера, а остальные должны покрывать максимальную ширину страницы. Постараюсь таким образом, вот мой CSS код:
/* generic style*/
table, td, th {
border: solid# CCC;border - width: 1 px 0;border - collapse: collapse
}
.check {
padding: 5 px 0 px;width: 1000 px
}
.name {
padding: 5 px 100 px;width: 1000 px
}
.family {
padding: 5 px 40 px;width: 1000 px
}
.productCode {
padding: 5 px 30 px;width: 1000 px
}
.descr {
padding: 5 px 20 px;width: 1000 px
}
td {
padding: 5 px 0 px;width: 1000 px
}
/* fixed header */
div.tablewrap {
position: relative;width: 1000 px;padding - top: 20 px
}
div.tablewrap - inner {
width: 1000 px;height: 230 px;overflow: auto
}
div.tablewrap thead tr {
position: absolute;top: -3 px
}
Вот мой HTML-код:
<div class="tablewrap">
<div class="tablewrap-inner">
<div ng-controller="ctrlRead">
<table class="table table-hover" border="1">
<thead>
<tr>
<th class="check">
<input type="checkbox" onclick="checkAll(this)" />
</th>
<th class="name">Nome <a ng-click="sort_by('name')"><i class="icon-sort"></i></a></th>
<th class="family">Famiglia <a ng-click="sort_by('family')"><i class="icon-sort"></i></a></th>
<th class="productCode">Codice prodotto <a ng-click="sort_by('productCode')"><i class="icon-sort"></i></a></th>
<th class="descr">Descrizione <a ng-click="sort_by('description')"><i class="icon-sort"></i></a></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in items | orderBy:sortingOrder:reverse " id="lista">
<td>
<input id="selectLine1" type="checkbox" value="{{item.check}}" />
</td>
<td>{{item.name}}</td>
<td>{{item.family}}</td>
<td>{{item.productCode}}</td>
<td>{{item.descr}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
Пожалуйста, дайте мне несколько советов!