Tag Archives: mobilesafari

Making viewport units work properly in Mobile Safari

A typical issue with the well supported Viewport Relative Units (you know: vh, vw, vmin, and vmax) that bothers me a lot is that MobileSafari (Safari on iOS) takes the height of the address bar into account for 100vh. Take … Continue reading

Elsewhere , , , , 1 Comment

Prevent overscroll/bounce in iOS MobileSafari (CSS only)

No need to hijack touchstart via JavaScript as this little CSS snippet, preventing the rubber band scrolling (as shown on the left), works just fine: html, body { position: fixed; overflow: hidden; } Tested with iOS8, iOS9, and iOS10. As … Continue reading

Elsewhere , , , 15 Comments