title: How to resolve position:fixed for a bottom toolbar on iOS (iPhone/iPad)
body: <p>I have a bar that is fixed to the bottom of every page on my website by using position:fixed. The problem is that on devices like iPhone or iPad this property is not respected.</p>
  
  <p>I tried to use javascript to detec the screen height, scroll position, and this works perfectly on the iPad:</p>
  
  <pre><code>$( window ).scroll( function ( ) { $( "#bar" ).css( "top", ( $( window ).height() + $( document ).scrollTop() - 90 ) +"px" );  } );
  </code></pre>
  
  <p>As you can see I'm using jQuery. The problem is that this code does not quite work on the iPhone because the window's height does not include the location bar (and also the debug bar if present), so the bar goes on the right place at first, but as you scroll it gets fixed above the right position (the amount of pixels used by Mobile Safari's location bar).</p>
  
  <p>Is there a way to get this information and properly fix this toolbar?</p>
  
  <p>Have in mind this is not a website made for iPhone, so I can't use tricks like iScroll at all.</p>