S
S
Sergey Volkov2021-06-17 14:26:13
css
Sergey Volkov, 2021-06-17 14:26:13

Why is the modal not scrolling?

Hello !

For some reason, the modal window does not scroll, I will be very grateful if you help ))

When I click on the button, a modal pops up and the .stop-scrolling class is hung on the body.
60cb30937a958491421836.jpeg
css body:

.stop-scrolling {
    overflow: hidden
}


css for the modal window:
top: 0;
    position: fixed;
    z-index: 10000;
    width: 100%;
    min-height: 110vh; 
    background-color: #000;
    transition: all .25s;
    transform: translateX(-4000px);


Website: lunamag-articles.malevich-web.ru

I would be very grateful if you could help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Dubrovin, 2021-06-17
@GovnoKoder_ITS

overflow: hidden - hides content outside of the block.
If there is no content, there is nothing to scroll.
The problem with the modal window is that it is inside the body - which hides the extra content.
A modal window scroll may appear if the content inside it is greater than "110vh" (Minimum height is set)
You can also try to hang overflow: scroll on the modal window

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question