[thelist] div's pixel coordonates
Peter-Paul Koch
gassinaumasis at hotmail.com
Mon Apr 22 17:20:00 CDT 2002
> > Is there a way (mainly Javascript) to find out the exact
> > pixel coordonates of a given <div> ?
>
>Both Mozilla/N6 and IE5 (and I think also Konqueror) support
>this extension for all elements:
>
> x= document.getElementById('mything').offsetLeft;
> y= document.getElementById('mything').offsetTop;
>
>I'd put all this together to come up with a reliable readPosition
>function for IE, N4, Moz, Opera and Konq. If I could be bothered.
>;-)
Already available at http://www.xs4all.nl/~ppk/js/index.html?findpos.html
ppk
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the thelist
mailing list