Title: Centering gallery with CSS?
Last modified: August 22, 2016

---

# Centering gallery with CSS?

 *  Resolved [gwtiburon](https://wordpress.org/support/users/gwtiburon/)
 * (@gwtiburon)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/centering-gallery-with-css/)
 * Hi all,
 * I am liking the gallery quite a bit, got my custom sorting, and everything ready
   to go. But for the life of me I can’t center the gallery inside the page. I’ve
   tried div classes and such with the edit css feature, but can’t figure it out.
   And just to go crazy, how do you add a border to the images? I didn’t see it 
   in the options. Going to re-check the docs now too.
    [http://raygunrex.com/artwork/](http://raygunrex.com/artwork/)
 * Any tips would be much appreciated!
    Thanks
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/centering-gallery-with-css/#post-5933055)
 * [@gwtiburon](https://wordpress.org/support/users/gwtiburon/) – Have you tried
   some custom CSS along these lines:
 *     ```
       /** Center Basic Thumbnails */
       .ngg-galleryoverview {
           text-align: center !important;
       }
       .ngg-gallery-thumbnail-box {
           float: none !important;
           display: inline-block !important;
       }
       ```
   
 * – Cais.
 * PS: I really like the artwork!
 *  Thread Starter [gwtiburon](https://wordpress.org/support/users/gwtiburon/)
 * (@gwtiburon)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/centering-gallery-with-css/#post-5933090)
 * Thank you, that worked great! Centered things nicely, I appreciate the help.
 * Now I have a new problem, it doesn’t seem to take my max column or image settings
   for the gallery lol.
 * Thanks again for the help, and glad you like the artwork!
 * Dax
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/centering-gallery-with-css/#post-5933107)
 * [@gwtiburon](https://wordpress.org/support/users/gwtiburon/) – You appear to 
   have deactivated NextGEN Gallery …
 * – Cais.
 *  Thread Starter [gwtiburon](https://wordpress.org/support/users/gwtiburon/)
 * (@gwtiburon)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/centering-gallery-with-css/#post-5933122)
 * Sorry, I had to. I had that issue where after you delete cache the thumbnails
   don’t show up. Spent a couple of hours trying fixes suggested on the forums, 
   seems like it worked.
 * But then my images would only appear in some weird layout, and wouldn’t respect
   the thumbnail settings (Wanted 3 columns of 5, wouldn’t work).
 * After hours of trying to get a gallery working on my site, I’ve given up.
    Will
   try to learn hand coding or some other solution to post 12 images.
 * Thanks
 *  Thread Starter [gwtiburon](https://wordpress.org/support/users/gwtiburon/)
 * (@gwtiburon)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/centering-gallery-with-css/#post-5933125)
 * Out of sheer stubborness I tried again. Seems like it’s working fine now!
 * No idea what changed besides re-activating, but glad it’s working.
 * Thanks again!
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/centering-gallery-with-css/#post-5933157)
 * [@gwtiburon](https://wordpress.org/support/users/gwtiburon/) – Thanks for the
   updates. Often times when it appears to work after a while it was due to some
   sort of caching on the site and/or the browser.
 * When “testing” always try to remember to clear the image cache under Gallery 
   > Other Options > Miscellaneous and possibly use an anonymous browser window 
   to try to ensure you see the changes you are testing immediately.
 * Thanks!
 * – Cais.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Centering gallery with CSS?’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [center](https://wordpress.org/support/topic-tag/center/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [div](https://wordpress.org/support/topic-tag/div/)
 * [gallery](https://wordpress.org/support/topic-tag/gallery/)

 * 6 replies
 * 2 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/centering-gallery-with-css/#post-5933157)
 * Status: resolved