Add inner border to an image with CSS

To add an inner border to an image, you can add the following CSS code to your style.css file:

img {
  outline: 1px solid white;
  outline-offset: -6px;
}

Change the offset and the outline colour to your liking.

 

Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.

 

6 thoughts on “Add inner border to an image with CSS

Leave a Reply

Your email address will not be published. Required fields are marked *