supposing elements are along z axis, correct centering for boxes