hiding divs with negative margins on ipad

186 views Asked by At

I have an animation on ipad things go from -200px to 1500px and are hidden in a browser with overflow-x:hidden.

When I look on ipad I can scroll "off screen" and see the hidden items even though the body and html and set to width:100% and height:100%.

How can I fix this in ipad?

3

There are 3 answers

0
FaJo On

You might use media querys for the Ipad Viewport.

@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) { /* STYLES GO HERE */}

0
Bommelding On

You could try to put the animation in a div that is not wider than the screen. Then apply overflow:hidden; on that div.

0
LeBlaireau On

Try like this:

html, body {
   position:relative;
}