/    Sign up×
Community /Pin to ProfileBookmark

Determining Element Position

I have been experimenting with the code for determining element position that is on DHTML Diner

[url]http://www.webreference.com/dhtml/diner/realpos4[/url]

I have thought of some enhancements that could be made to this:-

  • It needs to take account of scrollTop and scrollLeft, in the event that an element is positioned within say a DIV which has overflow:auto set;

  • Mozilla 1.6 does not seem to recognise in the offsetParent chain, positioned DIV borders.

  • As a quirk, in Mozilla 1.6 if you have a positioned DIV with border set, and also “overflow:auto” set, then you seem to need to count the border value “twice” in calculating element position.

  • Does anyone know how you submit comments to Webreference?

    to post a comment
    JavaScript

    0Be the first to comment 😎

    ×

    Success!

    Help @baconbutty spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.28,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...