【发布时间】:2021-04-01 21:51:50
【问题描述】:
我在 html bootstrap 中有一个表格,该表格在页面加载时看起来很合适,但在页面完全加载后表格变得可滚动
我的代码是:
<div class="table-responsive">
<table class="table table-striped table-borderd" id="orderTable">
<thead>
<tr>
<th>S.No</th>
<th>Order ID</th>
<th>Ordered By</th>
<th>Branch name</th>
<th>Order Date </th>
<th>Order Time </th>
<th>Status</th>
<th>Invoice Status</th>
<th>Actions</th>
</tr>
</thead>
<tfoot>
<tr class="sn">
<th>S.No</th>
<th>Order ID</th>
<th>Ordered By</th>
<th>Branch name</th>
<th>Order Date </th>
<th>Order Time </th>
<th>Status</th>
<th>Invoice Status</th>
<th>Actions</th>
</tr>
</tfoot>
<tbody>
</tbody>
</table>
</div>
谁能告诉我如何使它适合屏幕并避免滚动。提前致谢
【问题讨论】:
-
你能显示你的整个代码吗?只有这些代码可以正常工作,并且表格在我的机器上无法滚动。
-
@Zubair:和平!您有一些其他 CSS 应用于该表。在 codepen 上分享你的代码。将需要检查问题。我在没有滚动的情况下检查了它。
-
@George 数据来自数据库
-
@ImranRafiqRather 你能开个聊天室吗
-
等一下兄弟:)让我打开并分享链接
标签: html css bootstrap-4 html-table