WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] Centering Galleries (6 posts)

  1. the_producer
    Member
    Posted 5 years ago #

    I can't find any help about centering galleries here, it seems everyone that posts a question about it doesn't get an answer. Hopefully I will have better luck. Every gallery I post, the thumbs are always left, I've played with the CSS but cannot get them to center. Center tags on the short code are useless too. Any help? I can't believe there isn't a simple 'center' tag when adding the gallery, seems like a no-brainer...

  2. variedcelluloid
    Member
    Posted 5 years ago #

    Been looking for some help myself. I really wish for something like a basic '< center >' command, that way if my gallery wraps around on a different line because someone has a smaller resolution than I use the two colums won't be uneven. That way if you have four images, and after the third one there's no more room to fit it on the same line it would just drop down a new line and center underneath the second of the three in the center of the page. My knowledge of CSS/PHP is so limited however, even if there is a simply fix I'm about as clueless as a bear in algebra class.

    Unfortunately the only thing I've been able to do is play with the 'Width: ;' under '.ngg-galleryoverview' within the stylesheet - I set it to about %70 of the table or so until it evens out about right. However, since my layout uses the entire page and auto adjusts whenever the screen expands horizontally, I run into the same problem that once I change resolutions things look drastically different. This also only changes the thumnail box itself, and doesn't center any of the thumbnails inside of it. So, at 800x600 I have three images side by side, and then my fourth drops a line and hangs all the way to the left instead of centering within the page.

    I wish I knew of some simple command to throw in 'ngg-gallery-thumbnail-box' that would float the images from left to right but also center the entire box and all of it's contents to complete center of the table it is in. My question/page is located here if all of my 2am rambling are as incoherent as I suppose they probably are! However, if you haven't played with that width adjustment, give it a shot I suppose. Hopefully you'll get an answer to your question, even if it's a "No, there is no centering!" it'll at least be an answer haha!

  3. rolanddeschain
    Member
    Posted 5 years ago #

    +1 for a solution to this. :)

  4. noise
    Member
    Posted 5 years ago #

    I too have been pulling the gallery css apart via FF & Firebug - I've centered many an item via <margin: * auto * auto;> but no matter how I tweak the cascade those little thumbnails won't center. I wouldn't think I'd have to hack the nggfunctions.php file just to center some thumbs.

    where the where it's getting that "float left" from, but so far I can 't see it - Firebug sure as heck can't see it.

    Shouldn't really be that hard

  5. nicknormal
    Member
    Posted 5 years ago #

    frustrating because the native wordpress gallery system only inserts this nugget of code:

    <style type='text/css'>
    .gallery {
    margin: auto;
    }
    .gallery-item {
    float: left;
    margin-top: 10px;
    text-align: center;
    width: 33%;
    }
    .gallery img {
    border: 2px solid #cfcfcf;
    }
    .gallery-caption {
    margin-left: 0;
    }
    </style>

    then marks the thumbs accordingly to text-align for center. neither that nor the margin for auto seem to work for NextGEN though.

  6. Alex Rabe
    Member
    Posted 5 years ago #

    the native gallery works with page breaks <br /> so it's not compare able to the NextGEN solution. Please look for my reply here http://wordpress.org/support/topic/193789

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.