WordPress.org

Support

Support » Plugins and Hacks » NextGEN Gallery - WordPress Gallery Plugin » [Plugin: NextGEN Gallery] How do I use different css stylesheets for differnt galleries?

[Plugin: NextGEN Gallery] How do I use different css stylesheets for differnt galleries?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Greg, did you ever figure this out? You don’t have to get tricky, you can just target different galleries specifically using CSS. Each gallery has its own id so if you want to make images in gallery A look different than B you would need to target the specific gallery. Hope this helps. Let me know if you need more help.

    For example:

    #ngg-gallery-1-586 .ngg-gallery-thumbnail {
    width:100px;
    float:left;
    }
    
    #ngg-gallery-2-245 .ngg-gallery-thumbnail {
    width:60px;
    float:right;
    }

    Sorry, I’ve just been dealing with the problem. Today I wanted to fix it again, googled it, and found my own post! Thanks for the reply. So would I add this CSS to the nggallery.css files then?

    A little more info: I want the image thumbnails on my blog to be centered and the thumbs in my portfolio to be left aligned.

    Thanks in advance!
    -Greg

    Yes, add any CSS to nggallery.css.

    I’m not sure how your theme is configured but you should have a body class that would enable you to target specific page types or IDs along with the thumbnails. It could look something like:

    .page-id-41 .ngg-galleryoverview {
    display: block !important;
    text-align: center;
    }

    Could be “.single”, “.single-post”, “.home”, “.page”, etc, depending on your theme and placement. All this depends on your theme using the body class <body <?php body_class( $class ); ?>> Codex – Body Class

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: NextGEN Gallery] How do I use different css stylesheets for differnt galleries?’ is closed to new replies.
Skip to toolbar