set position when box is opened