L
L
lilzen2019-03-16 16:36:34
css
lilzen, 2019-03-16 16:36:34

Bootstrap second scrollbar when opening modal window?

Hello, I have such a question... When opening a bootstrap modal window on the site, a second scroll bar appears. One scrolls the modal window, the second page of the site is hidden by the modal window. How to disable site scrolling?!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
profesor08, 2019-03-16
@profesor08

When a modal is opened, the bodyclass .modal-openis attached to it, and its styles disable scrolling. Check for all styles, all scripts. If you have scrolling inside another element implemented, then disable it:

.modal-open .scroll-elem {
  overflow: hidden;
}

If nothing worked, then reproduce the problem on jsfiddle.

S
sendruck, 2019-03-16
@sendruck

This is done through the overflow property, you just need to find which block to apply it to.
htmlbook.ru/css/overflow

L
lilzen, 2019-03-17
@lilzen

Greetings experts ... found a problem in my style file was added

html,body{
  overflow-x: hidden; 
}

when I remove the problem with the scroll, only another one appears.
The site starts to lick for 100% in width and a scroll appears from below!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question