The following grid image is 100 pixels wide by 100 pixels high. It has a 1px dotted red border around it and a padding-left and padding-top of 150 pixels. In Internet Explorer 6 and in Internet Explorer 7, the property event.offsetX/event.offsetY return the x/y mouse coordinates within the element, including the padding but excluding borders. event.offsetX/event.offsetY return the mouse coordinates within the target element according to the padding box, not according to the content box.
event.offsetX
property definition at MSDN
CSSOM View
Module Reference (W3C Working Draft 17 December 2013) states:
(...) return the x-coordinate
of the position where the event occurred relative to the origin of the padding edge of
the target node (...)
(...) return the y-coordinate of the position where the event occurred relative to the origin
of the padding edge of the target node (...).