Note: please check the offsetParent property if you’re not familiar with it.
The offsetLeft property is read-only and so we can’t assign a value to it.
The distance between the left inner border of the offsetParent node (the <ol> element in this example) and the outer left border includes the left padding of the offsetParent node and the left margin of the current element.
So if we combine these two values, we should get the distance for this particular example:
21px + 21px = 42px;
But remember, in other scenarios, there might be other nodes between these two elements which will affect the final distance.