change wp-gallery image border color

Support Area Forums Agency change wp-gallery image border color

Viewing 2 posts - 1 through 2 (of 2 total)
URL to the page in question: http://www.aquascience.com/
  • Author
    Posts
  • #20793
    Alice Frenz
    Participant

    Hi Bill,

    I was able to change the border color of the images in wp-gallery from #cfcfcf to #c7d6dc by editing wp-includes/media.php but I would really rather have the change in the Custom CSS.

    I tried this idea I found in the Custom CSS but it didn’t work.

    #contentwrapper .gallery .gallery-item img {border: 2px solid #c7d6dc;}

    Any ideas?

    #20796
    Bill Robbins
    Moderator

    Hello Alice,

    Good question. You can change the border color just with a bit of CSS. Here’s what to do:

    1. Go to the Theme Options page and select the Styling tab.
    2. Scroll down to the Custom CSS box and paste this:
      
      #content .gallery img {
      	border-color: #000000;
      }
      

      Just replace the #000000 with the code of the color you'd like to use.

    3. Update your settings.

    It's usually best not to edit the core WordPress files. One reason is when you update, you'll have to make the edits again or lose them when WordPress is updated.

    If you have any questions or trouble, let me know.

    Have a great week,
    Bill

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘change wp-gallery image border color’ is closed to new replies.