Update gallery CSS

* Makes sure the images don't overlap when using a lot of columns
* Hides the captions for galleries with 7 or more columns