Tutorials

CSS 'border-image' Property Explained

  • Published
  • 2 min read
  • CSS
  • HTML
  • Web Design
CSS 'border-image' Property
In this article
  1. CSS 'border-image' Property Examples
  2. Browser Support For 'border-image' Property
  3. CSS Syntax of the 'border-image' Property
  4. Usage of the 'border-image' Property
  5. Property Values of the 'border-image' Property

Corrected . The browser-support table was rebuilt from MDN browser-compat-data (unprefixed support, desktop browsers), checked 3 October 2026. Editorial approval is still pending.

The CSS 'border-image' property is a shorthand for specifying an image instead of the standard border style. This property combines several border-image properties into one, including setting the image source, slice, width, outset, and repeat the behavior. It enables the creation of intricate and visually appealing border designs that can enhance the aesthetic of a web page or component.

CSS 'border-image' Property Examples

See the Pen CSS 'border-image' Property by Webzstore (@webzstore) on CodePen.

The 'border-image' property offers a powerful and flexible way to enhance the visual design of elements with custom borders, allowing for creative expression beyond traditional CSS borders.

Browser Support For 'border-image' Property

Unprefixed support for the border-image property (selected supported implementation, desktop browsers)
BrowserVersionReleased
Chrome16Dec 2011
Edge12Jul 2015
Firefox15Aug 2012
Safari6Jul 2012
Opera11Dec 2010

Source: MDN browser-compat-data 8.1.4, checked 3 October 2026. Prefixed support and implementations that were later removed are not counted, and some browsers list partial support or extra values. See the MDN reference for border-image for the full compatibility details, including mobile browsers.

CSS Syntax of the 'border-image' Property

border-image: source slice / width / outset repeat | initial | inherit;

Usage of the 'border-image' Property

Use 'border-image' instead of a solid border style when applying a graphical border to an element. This can be particularly useful for creating decorative borders incorporating brand colors, patterns, or themes. The property provides a flexible way to add visual interest and design detail to elements without adding additional markup or relying on external graphics.

Property Values of the 'border-image' Property

  • Source: Specifies the path to the image to be used as the border.
  • Slice: Defines how the image is divided into regions. The values determine the inward offsets from the image's top, right, bottom, and left edges, effectively slicing the image into nine parts: four corners, four edges, and the middle.
  • Width: This setting sets the width of the border image. If not specified, it defaults to the size of the border.
  • Outset: Determines how far the border image extends beyond the border box.
  • Repeat: Controls how the border image is repeated. Values include stretch, repeat, round, and space.
  • Initial: Resets all properties of 'border-image' to their initial values.
  • Inherit: Inherits the 'border-image' properties from the parent element.

Share this article

Written by

Webzstore Team

Webzstore has helped businesses since 2010. Today, we bring websites, digital marketing and enquiry follow-up into practical plans built around the work each business needs.

Related services

Talk about your website or marketing

Book a Free 30-Minute Call

More tutorials

All tutorials

Privacy choices

Choose what this website may load. Your choice is saved on this device for up to 180 days. Privacy Policy

Turning a choice off stops further use of that optional service on this site. It does not take back information already sent, and we cannot delete cookies that other services set in your browser.