Getting Layer's Top and Left
Friends i have a css style with the following parameters.
then i have a DIV with the ID of "map"
now i want the browser to show me the TOp and LEFT parameters of the DIV when the page is shown in the browser.
like i want to do like this :
var mapTop = document.getElementById( "map").style.top;
var mapLeft = document.getElementById( "map").style.left;
but it a BLANK ALERT BOX
Last edited by zeeshanhashmi; Apr 5, 2007 at 08:05.
i do not want to know the CSS property. I want the POSITION of a LAYER on SCREEN.
Which is exactly what that function does... It will get the position or whatever property you want.