In my .NET Core 7 MVC project, I am facing a challenge where I want to make a details table scroll and occupy the available vertical space on the screen dynamically.
I have tried using h-25, h-50 classes to achieve the scrolling effect on the table. However, this approach only sets a static height for the table, which does not adjust when the page size changes or if a row collapses above it.
You can view a demonstration of this issue in this updated JSFiddle.
Below is an example code snippet that represents my attempt to address the problem:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e6848989929592948796a6d3c8d4c8d5">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<div b-vtqmm3i4v1 class="container-fluid overflow-hidden vh-50">
...
</div>
</div>
</div>
</main>
</div>