title: Floating and Offset Javascript Values
body: <p>I have two items that I am floating right in my XHTML page. Unfortunately, when I try to get the offset of the right most item... it comes back as the position the element would be in if it were not floated.</p>
  
  <pre><code>    &lt;div id="Left style="float:right"&gt;&lt;/div&gt;
      &lt;div id="right" style="float:right"&gt;&lt;/div&gt; 
  
      Using Jquery 
      &lt;script type="text/javascript"&gt; 
         var right = $("#right"); 
         alert(right[0].offsetLeft); 
      &lt;/script&gt;
  </code></pre>
  
  <p>Do I have to do something like this?</p>
  
  <pre><code>function findPos(obj) {
      var curleft = curtop = 0;
      if (obj.offsetParent) 
      {
          do 
          {
              curleft += obj.offsetLeft;
              curtop += obj.offsetTop;
  
          } while (obj = obj.offsetParent);
      }
  }
  </code></pre>