How to put scroll bar only for modal-body?

You have to set the height of the .modal-body in and give it overflow-y: auto. Also reset .modal-dialog overflow value to initial.

See the working sample:

    display: block !important; /* I added this to see the modal, you don't need this */

/* Important part */
    overflow-y: initial !important
    height: 80vh;
    overflow-y: auto;

Leave a Comment