I\'m trying to use Bootstrap for the first time and am having an issue with modal dialogs. Using the example code on this page, when the modal is opened a scrollbar appears,
In this case you can overwrite bootstrap main css using your own css cause sometime may effect other. so this is simple code which work
body.modal-open .modal {
margin-right: -15px !important;
}
body.modal-open {
margin-right: 0 !important;
}
if you want to change main bootstrap css then update this
body.modal-open, .modal-open .navbar-fixed-top, .modal-open .navbar-fixed-bottom {
margin-right: 0 !important;
}
LVarayut's answer sent me in the right direction and what I ended up using is this:
body.modal-open, .modal-open .navbar-fixed-top, .modal-open .navbar-fixed-bottom {
margin-right: 0;
}
.modal {
overflow-y: auto;
}
This work for me. It should work fine
body.modal-open {
padding-right: 0 !important;
overflow-y: scroll;
}
Its mainly due to the CDN used ...Remove the CDN https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" from your page and the problem is solved..I had done it.
Try This
.modal-open {
overflow-y: auto
}
This is my solution
#myModal{
overflow:hidden;
}
body {
overflow-y: scroll !important;
}
With this,you will force your page to have a scroll bar.