Checks if the z-index of the children follows order.