I have this example: /
<div class="container-fluid pt-1 pb-1 mb-3 header-section"> Header Section </div>
<div class="container-fluid content-section">
<div class="row">
<div class="col-12">Filter Section</div>
</div>
<div class="row">
<div class="col-12">
<div class="test-table"></div>
</div>
</div>
</div>
</div>
<footer>Footer Section</footer>
Where is a simple page using vue and bootstrap 5. In this example there is a lot of data and the table fills the page down (as supposed). If you want to use the horizontal scroll you have to scroll vertically until you reach down then use the horizontal scrollbar which is annoying.
So I want to change that by disabling the vertical scroll for the page, and apply it only for the table (when there is a lot of data). So the idea is when the table has a lot of data to expand until reach the footer (to be able to use the horizontal scrollbar).
Like this:
How can I change the layout to be able to do that?
I have this example: https://jsfiddle/xcugq7d1/
<div class="container-fluid pt-1 pb-1 mb-3 header-section"> Header Section </div>
<div class="container-fluid content-section">
<div class="row">
<div class="col-12">Filter Section</div>
</div>
<div class="row">
<div class="col-12">
<div class="test-table"></div>
</div>
</div>
</div>
</div>
<footer>Footer Section</footer>
Where is a simple page using vue and bootstrap 5. In this example there is a lot of data and the table fills the page down (as supposed). If you want to use the horizontal scroll you have to scroll vertically until you reach down then use the horizontal scrollbar which is annoying.
So I want to change that by disabling the vertical scroll for the page, and apply it only for the table (when there is a lot of data). So the idea is when the table has a lot of data to expand until reach the footer (to be able to use the horizontal scrollbar).
Like this:
How can I change the layout to be able to do that?
Share Improve this question asked Mar 21 at 12:35 calin24calin24 9914 gold badges24 silver badges49 bronze badges 6 | Show 1 more comment1 Answer
Reset to default 0just change the overflow-x to scrollbar in .test-table css and it will work fine.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744353886a4570133.html
100vh
height, and applyflex-shrink: 1
andoverflow: auto
to.content-section
. jsfiddle/qbaptvef – C3roe Commented Mar 21 at 13:16