• I figured out how to post full-size images using the built in gallery, but i cannot get rid of the white border around the images (see https://blog.zangenberg.net/ ). All the answers I can find only pertains to posting regular single images and has no effect on the gallery images.

    Does anyone know wich file contains the code that adds the border to the “thumbnails” in the gallery?!?

Viewing 6 replies - 16 through 21 (of 21 total)
  • you could try and force it by adding at the end of the style.css:

    #gallery-1 img {
    border: none!important;
    }

    not sure if it will work, but worth a try ??

    It’s the default css inserted by the gallery shortcode from wp-includes/media.php.

    #contentwrapper .gallery .gallery-item img {border:none !important;}

    might remove it for all galleries.

    Thread Starter perzk

    (@perzk)

    YES!!!! In the media.php file I found a gallery section with the line:

    border: 2px solid #cfcfcf;

    wich I changed to:

    border: 0px solid #cfcfcf;

    And now it works as wanted! Thank you all very much for sticking with me on this I really appreciate it! ??

    jamesphough

    (@jamesphough)

    Thank you so much for this! Every time I install my WP update I have to refer back to this discussion to remove the re-appeared grey border.

    Much love.

    I so love this help!! Thanks all!

    Yep, every time I update to a new version of WP, I have to hunt down this fix. Oh, how I HATE editing core files!

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘How to remove border on gallery images???’ is closed to new replies.