Alex Rivera | Logout

Fixed positioning in Mobile Safari

Asked 2009-04-13T05:42:38.317
66

Is it possible to position an element fixed relative to the viewport in Mobile Safari? As many have noted, position: fixed doesn't work, but Gmail just came out with a solution that almost is what I want – see the floating menu bar on the message view.

Getting real-time scroll events in JavaScript would also be a reasonable solution.

Edit
Report

1 Answer

10

See Google's solution to this problem. You basically have to scroll content yourself using JavaScript. Sencha Touch also provides a library for getting this behavior in a very performant manor.

answered 2010-12-22T18:58:58.613

Your Answer