Fill a box with thumbnails evenly like Google Images