Does overflow:hidden applied to <body> work on iPhone Safari?
Does overflow:hidden
applied to <body>
work on iPhone Safari? It seems not.
I can't create a wrapper on the whole website to achieve that...
Do you know the solution?
Example: I have a long page, and simply I want to hide the content that goes underneath the "fold", and it should work on iPhone/iPad.
I had a similar issue and found that applying overflow: hidden;
to both html
and body
solved my problem.
html,
body {
overflow: hidden;
}
For iOS 9, you may need to use this instead: (Thanks chaenu!)
html,
body {
overflow: hidden;
position: relative;
height: 100%;
}
body {
position:relative; // that's it
overflow:hidden;
}