我已將DataTable放置在容器類型的Bootstrap div中。當我在瀏覽器的最大寬度上運行網站時,表格的容器會添加一個滾動條並切斷表格中的最後一列。如何在最大寬度上增加Bootstrap容器的寬度?
我嘗試使用container-fluid
div類型作爲建議here,但這會進一步降低表格容器的寬度。
在檢查似乎元素周圍container body-content
繼承形式佈局頁面添加邊緣左側和右側的表容器:
一個可行的辦法,我想,如果在最大寬度上減少繼承的container body-content
的邊距,但我不知道如何通過CSS來實現。
從下面的截圖中可以看到,刪除山坳被切斷,儘管有大量的表的空白凋側的擴大:
問:
如何增加最大寬度的Bootstrap容器的寬度?
吉斯特表容器標記:
<div class="container">
<div class="form-group">
<div class="table-responsive">
<div class="table-responsive" id="datatable-wrapper">
<table id="escalation" class="table table-striped table-bordered" cellspacing="0">
<thead>
<tr>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">ID</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Application</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">UID</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Type</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Status</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Statement</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Created</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Updated</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Last Update</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Next Update</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Root Cause</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Details</th>
<th style="font-size: 12px; border-right: 1px solid #7591ac; ">Delete</th>
</tr>
</thead>
<tbody>
@foreach (HP.ESCALATION.Web.Models.Escalation item in Model)
{
<tr>
<td>@item.ID</td>
<td>@item.Application</td>
<td class="td-limit">@item.EM</td>
<td class="td-limit">@item.Event</td>
<td class="td-limit">@item.status</td>
<td class="td-limit">@item.Statement</td>
<td class="td-limit">@item.Created</td>
<td class="td-limit">@item.Updated</td>
<td data-order="@item.UnixTimeStamp" class="td-limit">@item.UpdatedTime</td>
<td class="td-limit">@item.NextUpdate</td>
<td class="td-limit">@item.RootCause</td>
@* Add CRUD buttons to each table row --> *@
<td><button type="submit" style="background-color: #0CA281;" class="btn btn-success details">Details</button></td>
<td><button type="submit" class="btn btn-danger delete">Delete</button></td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>
</div>
佈局容器的要點:
<div class="container body-content" style="margin-top: 90px; margin-bottom: 70px;">
@* Main Content Render *@
<div id="content">
<div class="content-wrapper main-content clear-fix">
</div>
@RenderSection("featured", required: false)
<section class="content-wrapper main-content clear-fix">
@RenderBody()
</section>
</div>
</div>
你可以在這裏放置一個小提琴或任何鏈接? –