add root element for each slide and fix centering and resizing