centering and scrolling of the preview