The other solutions on stackoverflow (such as this one) talk about preventing the body
from scrolling. You are setting the body height, which is good, but the body still has a scrollbar. Try:
- Setting the
body
overflow
to hidden.
- Adding a new
div
that is height: 100%
; and overflow: auto
. Put the entire page inside this div. The div will have the scrollbar instead of the body. (Read the linked solution carefully).
Now, reasons I would discourage this:
- Users will hate you if you break the workflow they are used to. It is almost never the right thing to do.
- Scrolling the body is always much faster than a div scrolling. You will see very noticeable performance decreases if the page is very big at all.
Update: Address bar being moved
Chrome on Android is experimenting with moving the address bar down to the bottom of the screen to be more accessible for single-hand use. This is a great example of why a web page should never try to add hacks to work around browser behavior.