change width of thumbnails container based on width of thumbnail elements