title: Feature detection for position: fixed
body: <p>I am trying to find a script that detects if a device places <code>position: fixed</code> elements relative to the ViewPort and not to the entire document.</p>
  
  <p>Currently, standard desktop browsers and Mobile Safari (for iOS 5) do so, whereas Android devices place the fixed elements relative to the entire document.</p>
  
  <p>I have found a couple of tests to detect this, but none of the seem to work:</p>
  
  <ul>
  <li><a href="http://kangax.github.com/cft/" rel="nofollow">http://kangax.github.com/cft/</a> Gives me a false positive when I pass it from an Android device.</li>
  <li><a href="https://gist.github.com/1221602" rel="nofollow">https://gist.github.com/1221602</a> Gives me a false negative when I pass it in an iPhone with iOS 5.</li>
  </ul>
  
  <p>Does anybody know where to find / how to write a test that actually detects that? I don't want to rely on browser sniffing.</p>