1
1
12matthew122015-08-20 09:53:59
css
12matthew12, 2015-08-20 09:53:59

Why doesn't overflow: hidden for body work on all ios browsers?

I made a sliding side menu. I want to make it so that when it leaves, the scroll works only in this menu if it is full, and the site itself has been fixed. To do this, I set the style for body - overflow: hidden and everything works correctly everywhere, but on ios browsers everything continues to scroll. I tried to block the call through scripts, but everything does not work as it should. Does anyone know what the problem is and is there any solution?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
Evgeny Vedenin, 2015-12-09
@jvedenin

You need to set position:fixed for body. It turns out

E
Eldar Musin, 2015-08-20
@eldarmusin

On iOS, when the browser parses the code, it apparently does not take into account overflow for html and body.
I fixed it like this.

.wrapper{
   position:relative;
   overflow:hidden;
}

<body>
   <div style='wrapper'>
      Ваш контент тут
   </div>
</body>

A
Alexey, 2015-08-21
@Murmurianez

html, body{
height: 100%;
width: 100%
overflow: hidden;
}

1
12matthew12, 2015-08-21
@12matthew12

Alas, I have already tried these methods ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question