Title: Thumbnails Page / Number of Columns
Last modified: August 21, 2016

---

# Thumbnails Page / Number of Columns

 *  Resolved [YogieAnamCara](https://wordpress.org/support/users/yogieanamcara/)
 * (@yogieanamcara)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/)
 * Hi,
 * I have a problem with the number of columns to display in my thumbnails settings.
   If I go below a certain value the columns are not correctly displayed any longer.
 * For example when I set 4 columns only and a max of 12 images the result is
 * 1 2 3
    4 5 6 7 8 9 10 11 12
 * If I set 6 columns and a max of 12 images the result is
 * 1 2 3 4 5 6
    7 8 9 10 11 12
 * which is correct. But the with having set 4 columns I would expect that the 4th,
   8th and 12th image would not be displayed in a separate row!? And If I set for
   example 3 x 3 having 9 images in total I have 2 columns and the third image in
   the row is displayed in a new line 🙁 as well.
 * 1 2
    3 4 5 6 7 8 9
 * But I would expect to have
 * 1 2 3
    4 5 6 7 8 9
 * What is going wrong?
    I’m using the latest and greatest version of the free NextGEN
   Gallery plugin.
 * Cheers
    Yogie
 * [http://wordpress.org/plugins/nextgen-gallery/](http://wordpress.org/plugins/nextgen-gallery/)

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

 *  Thread Starter [YogieAnamCara](https://wordpress.org/support/users/yogieanamcara/)
 * (@yogieanamcara)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535168)
 * Hi,
 * is there nothing that can fix this? As for me it looks like that there is a need
   to change something in the gallery.php file?
 * Cheers
    Yogie
 *  Thread Starter [YogieAnamCara](https://wordpress.org/support/users/yogieanamcara/)
 * (@yogieanamcara)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535170)
 * When I look into the rendered page CSS code for the thumbnail image element –
   I can see that the value of the size is calculated based on the number of column
   I set.
 * The CSS says simply that the thumbnail container (not the thumbnail itself) can
   have x % width. And the info is stored in
 * /* Inline Styles */
 * {
    width: 25%;
 * }
 * The percentage for 3 columns it is 33% for 4 columns 25% etc.
 * Does anybody know where the calculation for the thumbnail space takes place?
 *  [tizz](https://wordpress.org/support/users/tizz/)
 * (@tizz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535171)
 * [@yogieanamcara](https://wordpress.org/support/users/yogieanamcara/) your question
   is very frequent, and if you had searched you would have found it.
    Set “0” in
   number of columns option usually is the best choice to fit images in the content.
 *  Thread Starter [YogieAnamCara](https://wordpress.org/support/users/yogieanamcara/)
 * (@yogieanamcara)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535172)
 * Might be the best choice for many but not for me!
 * I don’t wan’t to have the columns spread randomly or calculated when I give a
   ZERO
    I’m getting this:
 * 1 2 3 4
    5 6 7 8 .. 9 10 .. 11
 * where the .. are just placeholders for the gap.
 * So I want to have control over the way the images are displayed! And I don’t 
   want to have any nasty gaps.
 *  [tizz](https://wordpress.org/support/users/tizz/)
 * (@tizz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535173)
 * [@yogieanamcara](https://wordpress.org/support/users/yogieanamcara/) If you get
   that result with “0” probably your images aren’t all the same size.
    You have
   to adjust image size and/or template’s CSS, but without a link to the page with
   the problem you can’t have a concrete help.
 *  Thread Starter [YogieAnamCara](https://wordpress.org/support/users/yogieanamcara/)
 * (@yogieanamcara)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535174)
 * [@tizz](https://wordpress.org/support/users/tizz/) the images are all landscape
   and they have the same width.
 * The columns are set to “3”
 * [http://www.sensorgrafie.de/blog/2014/01/reisebericht-nova-scotia-teil-2/](http://www.sensorgrafie.de/blog/2014/01/reisebericht-nova-scotia-teil-2/)
 *  [tizz](https://wordpress.org/support/users/tizz/)
 * (@tizz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535175)
 * [@yogieanamcara](https://wordpress.org/support/users/yogieanamcara/) As you can
   see, thumbs are not the same size, the first is 169×100, the others are 149×100
   or 133×100. Your layout is 636 width and 676 height.
    Put in custom CSS style:
 *     ```
       .ngg-gallery-thumbnail-box {
       margin-right: 0;
       }
       ```
   
 * If it doesn’t work:
 *     ```
       .ngg-gallery-thumbnail-box {
       margin-right: 0 !important;
       }
       ```
   
 * Et voilà you’ll have 3 colums, but you have to fix anyway thumbs dimensions in
   Gallery settings options, to make them look better.
 *  Thread Starter [YogieAnamCara](https://wordpress.org/support/users/yogieanamcara/)
 * (@yogieanamcara)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535176)
 * [@tizz](https://wordpress.org/support/users/tizz/) – got it solved with
 *     ```
       .ngg-gallery-thumbnail-box {
       margin-right: 0 !important;
       }
       ```
   
 * Many thanks!
 *  [tizz](https://wordpress.org/support/users/tizz/)
 * (@tizz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535177)
 * You’re welcome.
    BTW, beautiful, beautiful places and photos.

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

The topic ‘Thumbnails Page / Number of Columns’ 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/)

 * 9 replies
 * 2 participants
 * Last reply from: [tizz](https://wordpress.org/support/users/tizz/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/thumbnails-page/#post-4535177)
 * Status: resolved