Kamis, 16 Juli 2020

scrollbar Bootstrap Modal

The real tittle is actually "how to make second shown Modal scrollbar". I have two modal on one page. The second modal should be shown as the result of ajax response sent in the first modal, so the first modal will be hidden and followed by showing the second modal. The second modal has a length, that it needs to be scrolled up and down. The problem was the scrollbar does not work for that modal, instead the scrollbar was functionable for the parent page.

So here is the solution:

 

<div class="modal fade" id="myModal"  role="dialog" aria-hidden="true" style="overflow-y: initial !important">
    <div class="modal-xl modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                ...
            </div>
            <div class="modal-body" >
                ... 
            </div>

        </div>
    </div>
</div>


Take a look at style="overflow-y: initial !important". This is the solution.

Tidak ada komentar:

Posting Komentar