The border-image-width property sets how thick the border image is drawn on each side. It is separate from border-width, which reserves space in the box model.
The initial value is 1 (a multiple of border-width). If the image width is larger than border-width, the painted frame can overlap padding or content. Negative values are invalid.
Baseline · Widely available.
Not deprecated and not experimental. Available across browsers since July 2015. Needs a border-image-source and slice to show any effect.
Syntax
CSS Syntax
syntax.css
border-image-width:<length-percentage> | <number> | auto | initial | inherit;
Use one to four values, like margin. Example: border-image-width: 20px 40px; for top/bottom then left/right.
Same source and slice. The slice regions still come from the image.
Choose auto. Each side’s paint width follows the intrinsic size of that slice.
Fallback. If a side has no intrinsic size, the browser uses that side’s border-width instead.
Good for artwork. Useful when the slice size in the file should drive the painted thickness.
Edge Cases & Pitfalls
If the frame looks too thin, too thick, or covers text, check these first.
vs
Not the same as border-width
border-width reserves layout space. border-image-width only controls how large the image paints.
overlap
Larger than border-width overlaps inward
If the image width exceeds border-width, the paint can cover padding or content. Add padding when that happens.
source
No source, no visible width
You still need a border-image-source and slice. Width alone does not create a frame.
number
Numbers multiply border-width
With border-width: 10px, border-image-width: 2 paints at 20px. The default 1 matches the border exactly.
reset
border resets the image
The border shorthand sets border-image back to none. Declare source, slice, and width after border.
Compatibility
Browser Support
border-image-width is a browser CSS property for decorative borders. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
border-image-width
Chrome 15+, Firefox 13+, Safari 6+, Edge 12+, Internet Explorer 11+. The auto keyword is supported from Chrome 16+.
97%Global support
Google Chrome15+ · auto 16+
Full support
Mozilla Firefox13+
Full support
Apple Safari6+
Full support
Microsoft Edge12+
Full support
Opera15+
Full support
Samsung Internet1.0+
Full support
Internet Explorer11
Full support
border-image-widthWidely supported
Bottom line: Safe for production. Prefer a length or number when you want predictable thickness; use auto when the slice size should drive the paint. It is not a runtime API.
Remember
Key Takeaways
Role: how thick the border image paints on each side.
Default:1 (matches border-width). Not inherited.
Not box model: larger paint can overlap padding or content.
Values: length, percentage, number multiplier, or auto.
One line:border-image-width sets the paint thickness of the frame — after you have a source and slice, and separately from border-width.
Frequently Asked Questions
It sets how thick the border image is drawn on each side. It can use a length, a percentage, a unitless multiple of border-width, or auto.
The initial value is 1, a unitless number. That makes the painted image width match the element’s border-width on each side.
border-width reserves space in the box model. border-image-width controls how large the sliced image is painted. If the image width is larger than border-width, the image can overlap padding or content.
auto uses the intrinsic size of the matching border-image-slice. If the source has no intrinsic size for that side, the browser falls back to border-width.
Yes. Use one to four values like margin: one for all sides; two for top/bottom then left/right; four for top, right, bottom, left.
It is Baseline Widely available: Chrome 15+, Firefox 13+, Safari 6+, Edge 12+, and Internet Explorer 11. The auto keyword is supported from Chrome 16+. It is a browser CSS property, not a Node.js feature.