【发布时间】:2021-06-17 00:29:08
【问题描述】:
我有一个网格布局,左栏中的一些导航药丸设置为“col-auto”,因为我希望它们只占用内容自然宽度的空间。
在第二个表中,我想要一个带有水平滚动条的大表。我能够做到这一点,只是表格总是跳到导航栏下方并且我无法将其呈现到右侧。
请参阅随附的小提琴:https://jsfiddle.net/3vxhd6jf/3/
<div class="container">
<div class="row">
<div class="col-auto"> <!-- Should only take up the necessary space -->
<!-- Nav tabs -->
<div class="d-flex align-items-start">
.....
</div>
</div>
<div class="col"> <!-- Should take up the rest of the space -->
<div class="tab-content">
<div class="tab-pane active" id="tab-data" role="tabpanel" aria-labelledby="nav-data">
<div id="div-data-container" class="mb-3 table-responsive">
<!-- The table -->
<table class="table table-sm table-striped">
.....
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
我想要实现的是在导航药丸右侧呈现表格,就像单击“JSON”药丸时呈现文本区域一样。
你能帮忙吗?
【问题讨论】:
标签: html css layout html-table bootstrap-5