How to determine the relative position of an element?
I know how to figure out the top coordinate of an element relative to the top of the document . I can use one of the following:
- document.defaultView.getComputedStyle(document.getElementById(element_id), '').getPropertyValue('top')
- document.getElementById(element_id).offsetTop
But I want to know the top coordinate of an element relative to the top of the viewable area of the browser . Does anyone know how to do this (in IE, Opera, and Mozilla)?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks