Volleynerd Knowledge Base |
Volleynerd's Things to Remember
Hot TopicsFirefox Extensions
DVD issues (latest)
Site Feed (Atom) Archives here
|
Saturday, February 19, 2005
Measuring Element Dimension and Location (Internet Explorer - DHTML) Once in a great while, when I'm hacking on some DHTML code, I wonder how all the various coordinate values for objects are inter-related. This link below is the MSDN help page that shows the coordinate values in a graphical way. Example: Show/hide DIV block with absolute positioning, and want it to show up near the user click. You have to take into account if the page is scrolled up a bit. clientY will tell you where you are in the window, but doesn't account for scrolling. HINT: use body.scrollTop to add to the clientY where the event was. But only if you have a reference to the BODY element - easiest way is obviously to give BODY an ID. Measuring Element Dimension and Location (Internet Explorer - DHTML) keywords: style visibility visible DHTML scrolling Internet Explorer IE Posted 10:38 PM | 0 comments | Permalink
Comments:
Post a Comment
|