Android browser CSS position: fixed bug (solved)

2011.11.17 | Android, Web Development | , ,

There’s a very annoying bug in Android browsers that’s not intuitive to fix: Sometimes position:fixed just doesn’t work right.  For me this manifested as the browser thinking that the bottom of the page was about 40px higher than it actually was, but only in landscape mode.

Without further ado, the fix is simple: set your meta viewport tag to not allow user-scaling.

<meta name="viewport" content="width=100%; initial-scale=1; maximum-scale=1; minimum-scale=1; user-scalable=no;" />

 

  • Dd

    awesome!!!! That’s what i am loooking for!!
     

  • zacharybrady

    YOU ARE A GOD! OMG! A FRIGGAN GOD! YOU SAVED A WEBSITE OF MINE AT THE LAST MINUTE. I have a meeting with a client in 40 minutes and this was the last issue.

    • SumBuddy

      you mean “African God” or “A Frigging God”?

  • Parihar Parihar28

    Not working in android web app…!

  • Carlos Selva

    Thank you very much, dude. Very effective and useful.

  • yene

    Only works with android 4.000 upward,

  • Pip Abrigo

    OMG! I swear I was about to cry of frustration… Thank you so much!!!!

  • Pingback: BLOG Fabbrika » CSS position: fixed nei browser Android 2.2/2.3()

  • max

    Waouwwwww

  • Soumya Ranjan

    Awesome Dude !! U saved couple of hours !

  • Joe

    just thanks!

  • Luke

    I love you man