remove padding right from body when modal

.modal-open {
    overflow: auto;
    padding-right: 0 !important;
}

A lot of the other solutions given here break that feature, and make your content shift slightly about when the modal opens. This solution will preserve the feature of the bootstrap modal not shifting content around, but fix the bug. This is a pure css solution that keeps the bootstrap functionality as it should be.



Leave a Reply