Problem finding position of object

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wedders
    New Member
    • Feb 2010
    • 2

    Problem finding position of object

    Hi all,

    I'm using the function provided by: http://www.quirksmode. org/js/findpos.html to find the position of a box on the screen, where I then fade-in a speech bubble with some data.

    This works fine in Firefox and Chrome (The whole thing's fucked in IE, so I don't know) but in Opera 10.10 and 10.50b2 the speech bubble spawns ridiculously short of where it should in terms of Y.

    The X position is dead-on, the Y is nowhere near.

    I've tried adding a constant offset to it, and one that adds a percentage of the window height and... well neither are resolution independant so, I'm kinda at my wits end.

    Go take a look at: http://nerdshack.info/, it's the link boxes bottom-left.

    It's probably my fault, but I don't know why!

    The Javascript is messy (website still in dev, obviously) but can be found at: http://nerdshack.info/main.js

    Thanks anyone!
    Ben.
  • Logician
    New Member
    • Feb 2007
    • 210

    #2
    Before investigating further, I suggest that you validate the document - http://validator.w3.org

    Comment

    • Wedders
      New Member
      • Feb 2010
      • 2

      #3
      Best advice I've heard in a long time - I always forget the W3C validator.

      A clumsy extra apostrophe in my php was all that was causing it! Crazy.

      Thanks mate!

      Comment

      Working...