SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot kryptokid's Avatar
    Join Date
    Nov 2001
    Location
    Brisbane, Australia
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I find out the X Position?

    Ok, I've got a button and I want something to appear underneath it.

    The problem is I've got the button centred, so I need to find out where on the x-axis it is so I can perfectly align the graphic underneath.

    Anyone that can help, please speak up.

    Thanks,

    Dan

  2. #2
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    assuming the button has id="mybutton"...
    Code:
    alert( getElementById('mybutton').style.pixelLeft )
    ----Adopt-a-Sig----
    Your message here!


Bookmarks

Posting Permissions

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