For my Mobile Web App I am trying to get screen width of the device to fit the views dynamically.
I am really confused why Motorola Atrix Atrix MB860 is reporting a 800px width. When I see the spec of this device its resolution is 540×960. Why in javascript it reports 800px? I used this test page:
http://www.quirksmode.org/m/tests/widthtest.html

I tested the above page on several devices and they all report width correctly apart from Motorola atrix. For instance galaxy s2 reports 480px and nexus 7 reports 1280px
It’s an odd behaviour of Android 2.3. which i found out here: http://tripleodeon.com/2011/12/first-understand-your-screen
window.outerWidth should do the trick or set viewport width to device-width