Title: rigidkitchen's Replies | WordPress.org

---

# rigidkitchen

  [  ](https://wordpress.org/support/users/rigidkitchen/)

 *   [Profile](https://wordpress.org/support/users/rigidkitchen/)
 *   [Topics Started](https://wordpress.org/support/users/rigidkitchen/topics/)
 *   [Replies Created](https://wordpress.org/support/users/rigidkitchen/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/rigidkitchen/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/rigidkitchen/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/rigidkitchen/engagements/)
 *   [Favorites](https://wordpress.org/support/users/rigidkitchen/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Plugin: NextGEN Gallery] Anyway to Center Thumbnails in Columns?](https://wordpress.org/support/topic/plugin-nextgen-gallery-anyway-to-center-thumbnails-in-columns/)
 *  [rigidkitchen](https://wordpress.org/support/users/rigidkitchen/)
 * (@rigidkitchen)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-anyway-to-center-thumbnails-in-columns/#post-1001731)
 * please see here to get around a table setup
 * [http://wordpress.org/support/topic/330620?replies=12#post-1289234](http://wordpress.org/support/topic/330620?replies=12#post-1289234)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Plugin: NextGEN Gallery] Anyway to Center Thumbnails in Columns?](https://wordpress.org/support/topic/plugin-nextgen-gallery-anyway-to-center-thumbnails-in-columns/)
 *  [rigidkitchen](https://wordpress.org/support/users/rigidkitchen/)
 * (@rigidkitchen)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-anyway-to-center-thumbnails-in-columns/#post-1001730)
 * double post/ see below
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: NextGEN Gallery] Latest Update of Next GEN Gallery messed up many thing](https://wordpress.org/support/topic/plugin-nextgen-gallery-latest-update-of-next-gen-gallery-messed-up-many-thing/)
 *  [rigidkitchen](https://wordpress.org/support/users/rigidkitchen/)
 * (@rigidkitchen)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-latest-update-of-next-gen-gallery-messed-up-many-thing/#post-1274272)
 * I have developed a workaround. This works really well for a ‘side orientated’
   gallery, to be accompanied by text in a post.
 * See [http://rigidkitchen.net/archives/happy-holidays](http://rigidkitchen.net/archives/happy-holidays)
 * Here’s my template file. You’ll notice I have some PHP that looks for an gallery“
   header” image. The gallery div is configured for 50×50 square thumbnails, you’ll
   need to play with CSS to get it to fit your size thumbnails. This also will not
   work for fluid layouts:
 *     ```
       <?php
       /**
       [comments]
       **/
       ?>
       <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
       <div id="gallery_<?php echo $gallery->ID ?>" class="galleryouter">
       <?php $filename = $_SERVER{'/path/to/public_html/'}."path/to/headerdir/".$gallery->ID."-headerthmb.jpg";
       if (file_exists($filename)) { ?>
       <div id="gallery_<?php echo $gallery->ID ?>_header" class="gallery_header">
       <a href="siteurl/path/to/hdr/dir/<?php echo $gallery->ID ?>-header.jpg">
       <img src="siteurl/path/to/hdr/dir/<?php echo $gallery->ID ?>-headerthmb.jpg" title="" alt="" />
       </a>
       </div>
       <?php } else { ?>
       <div id="gallery_<?php echo $gallery->ID ?>_header" class="gallery_header"><!-- No Gallery Header Image Found --></div>
       <?php }
       ?>
       <!-- end Gallery Header -->
       <div class="galleryimages"></p>
       <div id="gallery_<?php echo $gallery->ID ?>_inner" class="galleryimagesinner">
       <?php foreach ($images as $image) : ?>
       	<div class="gallery_small_thumb">
       		<a>imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?>>
       		<img title="<?php echo $image->alttext ?>" alt="" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?>class="gallery_thumbnail" /></a></div>
       <?php endforeach; ?>
       </div>
       </div>
       </div>
       <?php endif; ?>
       ```
   
 * CSS:
 *     ```
       .gallery_small_thumb img {
       border:medium none !important;
       margin:0 auto !important;
       padding:0 !important;
       }
       .galleryouter {
       float:left;
       margin:4px 10px 0 0;
       width:250px;
       }
       .gallery_header img {
       border:medium none !important;
       margin:0 !important;
       padding:0 !important;
       }
       .galleryimages {
       background:#E7EBEE none repeat scroll 0 0;
       overflow:auto;
       padding-top:10px;
       }
       .gallery_small_thumb {
       float:left;
       height:50px;
       margin:0 10px 10px 0;
       width:50px;
       }
       .galleryimagesinner {
       clear:both;
       padding:0 0 0 10px;
       }
       ```
   
 * Should be a good starting point for anyone looking to center images in a gallery,
   it’s a good solution to a table setup (ew tables). If anyone has a better solution
   please post it!
 * Note: The Post code thing went whacky, you might have to pick out some random
   markup…
 * About your problem with centering both portrait and landscape, you could try 
   modifying my code to wrap the images inside a “<p>”, like this:
 *     ```
       <div class="gallery_small_thumb">
       		<p class="galleryimage"><a>imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?>>
       		<img title="<?php echo $image->alttext ?>" alt="" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?>class="gallery_thumbnail" /></a></p></div>
       ```
   
 * and then for your CSS try this:
 *     ```
       .galleryimage {
       text-align:center;
       margin: 0px auto;
       padding:0px;
       background: none;
       }
       ```
   
 * It might need some finagling, but that should work.
 * As far as the lightbox/thickbox error goes, try playing with the thickbox settings,
   that seems like another type of error. Maybe you’ve enabled a setting where it
   automatically inserts a “rel=” into every image’s tag. I’m using a custom shadowbox
   build only meant for images and I don’t have that problem on the latest build
   of NextGen Gallery.

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