Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)

CSS 'border-image-repeat' Property Explained

Est. Reading: 2 minutes
Posted: April 6, 2024

The CSS 'border-image-repeat' property defines how the border image is repeated around the element's border. This property controls whether the image is stretched, repeated, or tiled to fit the border area, allowing for various stylistic effects that can enhance the visual appeal of an element's borders.

CSS 'border-image-repeat' Property Examples

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

The 'border-image-repeat' property provides a powerful way to customize the repetition and arrangement of images along an element's borders, supporting the creation of visually engaging and unique border designs.

Browser Support For 'border-image-repeat' Property

FirefoxSafariChromeMicrosoft EdgeOpera
15.01.015.06.015.0

CSS Syntax of the 'border-image-repeat' Property

border-image-repeat: stretch | repeat | round | space | initial | inherit;

Usage of the 'border-image-repeat' Property

Use 'border-image-repeat' to specify a border image's repeating behavior. This is particularly useful when you want to create specific patterns or effects with border images, such as seamless patterns, mirrored images, or stretched images that cover the entire border without repeating. It allows for creative border designs beyond simple solid colors or styles.

Property Values of the 'border-image-repeat' Property

  • Stretch: The image is stretched to fill the border area.
  • Repeat: The image is tiled (repeated) in the border area.
  • Round: The image is repeated and scaled to fit by adjusting its size to fill the area without being clipped. If it cannot be filled with a whole number of tiles, the image is rescaled to fit.
  • Space: The image is repeated to fill the area without being clipped. If it cannot be filled with a whole number of tiles, extra space is distributed around the images.
  • Initial: Resets the 'border-image-repeat' to its default value (stretch).
  • Inherit: Inherits the 'border-image-repeat' from the parent element.

Ryan Parker

Ryan has been a standout in digital marketing since 2010. He's the go-to person for getting businesses noticed online, with over 300 projects under his belt—these range from helping local business owners to big online stores. As the Head of Digital Marketing at his company, Ryan knows all the tricks to make companies shine on the internet. He's excellent at using the latest tech and smart strategies to get results. Ryan is all about making businesses grow and reach more people online.

chevron-down