Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Get position/offset of element relative to a parent container

var elm = document.querySelector('span');
console.log(elm.offsetLeft, elm.offsetTop);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Get #element #relative #parent #container
ADD COMMENT
Topic
Name
2+8 =