BootStrap 5
I'm using this layout:
<div class="row flex-nowrap">
<div class="left">
<!-- leftbar -->
</div>
<div class="main overflow-auto position-relative">
<!-- main site content -->
<div class="modal fade">
<div class="modal-dialog modal-fullscreen">
...
</div>
</div>
</div>
</div>
The main
is the main content area ( scrollable ).
I'm trying to use a full-screen modal inside main, but instead of it being relative to the viewport it should be relative to it's immediate parent (i.e main).
.modal
uses position:fixed
which won't let this happen. So I did this:
<div class="modal fade position-absolute">
<div class="modal-dialog modal-fullscreen">
...
</div>
</div>
But to no avail. It made it look messy. Is there a cleaner way to achieve what I'm trying to achieve.