jgd1234567
Programmer
Hi, I have a couple functions to return the position of a tag. I'm hoping i can then use this to position an absolute positioned tag on top of this tag. However since this returns the position from the edge of the browser, if i have a parent element which has relative positioning the element is absolute positioned tag is displayed incorrectly. Therefore to make things abit clearer i need to say something like:
function getPosition(element) {
return element x coordinate (from browser) - parent relative positioned tag coordinate (from browser)
}
You might have guessed the above code doesn't work . Appreciate if someone could help. Thanks
function getPosition(element) {
return element x coordinate (from browser) - parent relative positioned tag coordinate (from browser)
}
You might have guessed the above code doesn't work . Appreciate if someone could help. Thanks