Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    getting coordinates of an element with respect to top left of page

    How would you go about getting the (x,y) coordinates of an HTML element (a DIV in my case) with respect to the top left of the viewing area (basically, under the back button). I need this to work in firefox and don't care about IE. I've tried element.top and element.left, along with element.style.top and element.style.left, but neither seems to work. Any ideas?

  • #2
    New Coder
    Join Date
    Apr 2005
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •