• This is not a problem, I just thought I’d post something it took me a day or so to figure out, so hopefully others won’t fall into the same traps.

    I use the NextGEN gallery for pics I’ve taken on my mobile phone (and WPG2 for my digital pics stored in Gallery). I like the gallery picture list (thumbnail) view, but don’t like the way it handles a mix of vertical (portrait) and horizontal (landscape) pics. I wanted the pics centered both horizontally and vertically.

    Here’s the CSS code I used to achieve this:

    .ngg-gallery-thumbnail {
    	width: 164px; /* need fixed size boxes for centering to work */
    	height: 162px; /* need fixed size boxes for centering to work */
        	display: table; /* == For VERT. Align == */
    }
    
    .ngg-gallery-thumbnail a {
    	display: table-cell; /* == For VERT. Align == */
    	vertical-align: middle; /* == For VERT. Align == */
    	text-align: center; /* == For HORIZ. Align == */
    }
    
    .ngg-gallery-thumbnail img {
    	background-color:#FFFFFF;
    	border:1px solid #FFFFFF;
    	float: none;
    	display: block; /* == For VERT. Align == */
    	margin: 0em auto; /* == For HORIZ. Align == */
    }

    I did not touch the .ngg-gallery-thumbnail-box or .ngg-galleryoverview settings. Hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Can you tell me if you are running WPG2 and NGG Gallery plugins on the same WP install please?

    I’m trying to do this without much success at the moment. As soon as I activate the WPG2 plugin and then try and access a NGG page I am directed to G2 database error page!

    I’ve tried changing the path of the WPG2 plugin through Manage –> Page which amends the WPG2 address, but there seems to be some conflict somewhere.

    I look forward to your reply.

    Kind regards,

    Craig

    A-ha!!

    Excellent code fix. I’ve been stuck on trying to get this working properly for a while (my CSS skills suck).

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: NextGEN Gallery] Centering thumbnails in gallery view’ is closed to new replies.