auto set width of each slide