Got the sliding to work properly with most media sizes