Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap : how to disable vertical scrollbar?

when my modal popup window opens, it adds a vertical scrollbar to the right of the browser window. How do i disable this? I think this is enabled when the modal window has a very large height value where it needs to scroll. i want to disable this as my form height does not exceed the window height.

like image 889
user1929393 Avatar asked Sep 07 '25 15:09

user1929393


2 Answers

In your css add :

body {
  overflow-y:hidden;
}
like image 75
Patsy Issa Avatar answered Sep 09 '25 05:09

Patsy Issa


I have the same problem with bootstrap 3.0.0. It seems that .modal class has overflow-y: scroll rule which results in scrollbar always visible.

So, you can amend this either locally:

<div class="modal" ... style="overflow-y: auto;">
    ...
</div>

or globally:

<style>
.modal {
    overflow-y: auto;
}
</style>
like image 45
alx Avatar answered Sep 09 '25 03:09

alx