I am using a jQuery script to place an element a given distance from the bottom of the screen. (Yes, JavaScript is necessary to get the dynamic, intended behavior on this page.)
For most browsers, the element, which is represented by the grey bar at bottom of the image below, this code will place the element just fine:
var container = $('section.explore');
var winHeight = $(window).height();
container.css('margin-top', winHeight - container.height());
However, on Android browsers, I get this behavior (note the grey bar at the bottom):
In order to the get the search bar a certain distance from the bottom of the window, I have to scroll the entire way up so that the address bar is visible, then the bar is properly positioned.
Is there a way that I can better measure the window height so that the user doesn't have to view the address bar to see the element in its proper position?
Thank you for your time.