The padding or margin in your screenshot is the leftover space from all the thumbnails because the float to the left. You will need to devide the number of thumbnails (columns) you wish to have into the width of your page plus any thumb margin/padding to determine the best width for your thumbnails. It’s the only way for them to fit in properly. Hope this helps