• Hi – This may be a stupid question … but where do I adjust CSS settings for the WP galleries?

    I want no margins between thumbnails so they show up 5 across (5 thumbnails at 90px wide = 450px wide = the same width as my text above/below)…

    I would also like the second (and sometimes third) rows of thumbnails below to immediately follow — with no margin/white space between rows.

    I’m assuming that I will be able to do this with WP galleries … or do I need a plugin?

    Any help would be GREATLY appreciated! ??

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • you can find the gallery css in wp-includes/media.php

    Thread Starter transat99

    (@transat99)

    specialburce – Thanks!

    Thread Starter transat99

    (@transat99)

    Okay, I give!

    I’ve tried changing columns in wp-includes/media.php to:

    ‘columns’ => 4,

    …but I’m still getting 3 columns. At the moment my thumbnails are 100px wide so I’m just making sure this will work before I adjust them down to 90px.

    I’ve also changed:

    .gallery-item {
    float: left;
    margin-top: 0px;
    text-align: center;
    width: {$itemwidth}%;
    }

    .gallery img {
    border: 0px solid #cfcfcf;
    }

    …and I’m getting lots of margin (on all sides). I’ve tried adding “margin: 0px;” below “margin-top” with no results as well…

    Anyone have any ideas?

    Thread Starter transat99

    (@transat99)

    Does anyone know how to adjust the number of column (and the margins) for WP Galleries when the above doesn’t work?

    transat99,

    Did you ever figure out how to solve your problem? I have been trying to do the exact same thing with no luck.

    Thread Starter transat99

    (@transat99)

    thegreatgatzby-

    I just happened to look see this the day after you posted…

    I did figure it out about a month ago and should have posted it here at that time. In my theme’s style.css, I added:

    .gallery {
    margin: 0px;
    line-height: 0em;
    }

    .gallery-item {
    float: left;
    margin-top: 0px;
    text-align: center;
    }

    .gallery img {
    border: 0px;
    margin:0px;
    padding: 0px;
    }

    .gallery-caption {
    margin-left: 0px;
    }

    I believe that it “overrode” any conflicting CSS in my plugins (and everywhere else) and removed all spacing between thumbnails.

    Funny thing is — after I got it to work, I decided that I didn’t like it (for my thumbnails)! Hope it works for you. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘CSS for WP Gallery?’ is closed to new replies.