Title: Add default image border
Last modified: August 21, 2016

---

# Add default image border

 *  [Leah](https://wordpress.org/support/users/leahmarie/)
 * (@leahmarie)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/)
 * Please help!
    I have my own theme and want a default white border to be added
   for all my posted images. I don’t know code or where to place it. I have been
   searching online trying to find an answer.
 * Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [marcelvanderhoek](https://wordpress.org/support/users/marcelvanderhoek/)
 * (@marcelvanderhoek)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587121)
 * A line of CSS will do the trick:
 *     ```
       img{
       border: 2px solid white;
       }
       ```
   
 *  Thread Starter [Leah](https://wordpress.org/support/users/leahmarie/)
 * (@leahmarie)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587210)
 * Thank You Marcel but I don’t want a border on all my elements only the photos
   I post. What should I do?
 *  [Alex Dimitrov](https://wordpress.org/support/users/xavortm/)
 * (@xavortm)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587216)
 * You must select the tag that hold the posts. Check it with your browser debugger
   and write it. Could be something like that:
 *     ```
       .entry img {
         /* your code */
       }
       ```
   
 * Remember, don’t copy-paste it, check what is your entry tag!
 *  Thread Starter [Leah](https://wordpress.org/support/users/leahmarie/)
 * (@leahmarie)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587217)
 * I’m not exactly sure what you mean. I know very little coding. Can yo give me
   step by step instructions. Thanks
 *  [Alex Dimitrov](https://wordpress.org/support/users/xavortm/)
 * (@xavortm)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587220)
 * I can not tell you what is your theme’s post wrapper CSS class to give you exact
   tip. Can you **link me your site**, this will greatly help. (and please, next
   time you have such questions link the site if its hosted somewhere)
 *  Thread Starter [Leah](https://wordpress.org/support/users/leahmarie/)
 * (@leahmarie)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587222)
 * My site is leahmarieblog.com, under Galleries tab is the example of a photo posted
   that needs a border.
 * Thanks
 *  [Alex Dimitrov](https://wordpress.org/support/users/xavortm/)
 * (@xavortm)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587223)
 * It can be styled like that:
 * Select all images that are not floated to left or right, but you could just add
   the stylings for this with the[WordPress CSS classes](http://codex.wordpress.org/CSS#WordPress_Generated_Classes)
 *     ```
       img.alignnone {
         /* your code */
       }
       ```
   
 * or
 * reach it by the way the theme is structored:
 *     ```
       #container #left img {
         /* your code */
       }
       ```
   
 * The first one will select all images from all posts and apply styles to them 
   and the secound will select all images from the div#container #left and apply
   styles to them.
 * This is all you can do with the current theme structure. If you have more questions,
   ask 😉
 *  Thread Starter [Leah](https://wordpress.org/support/users/leahmarie/)
 * (@leahmarie)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587228)
 * Thanks Xavortm! That worked, but now I realize that my white border does not 
   show up on my white background. How do I change the color to an off white?
 *  Thread Starter [Leah](https://wordpress.org/support/users/leahmarie/)
 * (@leahmarie)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587231)
 * I just found a plug in WP Image Borders..I’m going to try that to get the look
   I’m going for.
 * Thanks
 *  [Alex Dimitrov](https://wordpress.org/support/users/xavortm/)
 * (@xavortm)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587237)
 * Instead of `border: 2px solid white;` You can write the color you need at the
   place of “white”. You can write HEX colors like #ddd, #ccc and such. Made your
   own here : [http://www.colorpicker.com/](http://www.colorpicker.com/). (you need
   to copy the letters above the picker and always have “#” before them)

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Add default image border’ is closed to new replies.

## Tags

 * [border](https://wordpress.org/support/topic-tag/border/)
 * [default](https://wordpress.org/support/topic-tag/default/)
 * [image](https://wordpress.org/support/topic-tag/image/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 3 participants
 * Last reply from: [Alex Dimitrov](https://wordpress.org/support/users/xavortm/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/add-default-image-border/#post-4587237)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
