Home page bug (iOS)

by kapowaz, Tuesday, March 05, 2013, 15:32 (4060 days ago) @ thebruce

Ideally, if the site detects a mobile browser, then set position:absolute, otherwise set position:fixed.

A header like this needn't be absolutely positioned anyway, since it's the first thing on the page. Seems like an odd choice to me, but then I've not delved into the rest of the markup to see how it's structured.

I ran into that exact problem recently with a redesign of my company's site, simply because the touch-zoom feature of mobile devices isn't really a standard browser thing you can trap easily, so without complex javascript to detect viewport alterations/sizes after the fact, fixed elements become a pain to work with. Easiest solution is just that - don't make them fixed on mobile devices.

Position: fixed used to be unsupported in earlier versions of iOS, but now it's actually supported it sometimes feels like more trouble than it's worth. I only really zoomed in my screenshot there to make it obvious what I'm talking about (I usually zoom in on the news column anyway, but as it's a lower level of zoom it wouldn't necessarily be clear in a shot like that.)


Complete thread:

 RSS Feed of thread