title: GWT: Positioning DIV on top of image using getAbsoluteTop/Left - FF off by a few pixels?
body: <p>I'm working on some Google Web Toolkit Code that places an AbsolutePanel on top of an image. The way I'm doing this is to:</p>
  
  <ol>
  <li><p>wait until the image is loaded (i.e. width/height are >0)</p></li>
  <li><p>get the absolute coordinates of the image in the viewport using image.getAbsoluteLeft() and image.getAbsoluteTop</p></li>
  <li><p>Set the position of the AbsolutePanel (a direct child of the RootPanel) to the same coordinates using RootPanel.get().setWidgetPosition(myPanel, imageAbsLeft, imageAbsTop);</p></li>
  </ol>
  
  <p>This works in Chrome and IE. Strangely, though, Firefox always positions the AbsolutePanel "a few" pixels (I'd say between 1 and approx 10? But it varies from page load to page load) above the image. I'm clueless as to what's causing this. Any hints much appreciated!</p>
  
  <p>A live example of this is here: <a href="http://yuma-js.github.com" rel="nofollow">http://yuma-js.github.com</a>. If you click the "Add Annotation" there's a draggable box, which movement is constrained by the AbsolutePanel. You'll notice that the constraining works perfect for Chrome, but is off for FireFox.</p>