Calculates element path relative to the parent