CSS border-image-outset Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The border-image-outset property sets how far a border-image is drawn outside the element’s border box. Raising the value makes the frame look larger without changing the box’s layout width or height.

Parts painted outside the border box do not receive pointer events and do not create overflow scrollbars. Leave room with margin if neighbors sit close. Negative values are invalid and the declaration is ignored.

Baseline · Widely available.

Not deprecated and not experimental. Supported across modern browsers since July 2015. Needs a border image to show any effect.

CSS Syntax

syntax.css
border-image-outset: <length> | <number> | initial | inherit;

Use one to four values, like margin: one for all sides; two for top/bottom then left/right; three for top, left/right, bottom; four for top, right, bottom, left.

Property Values

ValueDescriptionTry it
<length>Fixed outward distance, such as 12px or 1rem. Default is 0Try it
<number>Multiplies that side’s border-width. Example: 1.5 with an 8px border is 12pxTry it
Two valuesFirst is top and bottom; second is left and rightTry it
Four valuesTop, right, bottom, left in that orderTry it
initialResets to the default value, 0Try it
inheritInherits this property from the parent elementTry it

How to Use border-image-outset

Apply a border image first, give the border some width, then push the image outward.

  1. Set a non-zero border-width (for example border: 12px solid;).
  2. Add a border image with border-image or the source and slice longhands.
  3. Set border-image-outset to a length or a number. It is not inherited.
  4. Add margin when the outward paint would overlap neighbors.
PieceRequired?Role
Border widthYesGives the image area a thickness; zero width hides most borders
Border imageYesSource and slice (or the border-image shorthand)
Outset valueYes (to extend)Length or number. Default 0 stays on the box
Extra marginOftenOutset does not grow layout size, so nearby items may collide

Live Preview

The dashed stage is the layout box. Change border-image-outset and watch the gradient frame move outward.

Layout size stays the same. Only the painted frame moves out.

Frame

border-image-outset: 10px

CSS Examples

Each snippet adds only what border-image-outset needs: a border, a border image, and an outset value. Use Try It Yourself for a live editor.

Example 1 — Length Outset

Push the border image out by a fixed 15px on every side.

CSS
<style>
  div {
    border: 12px solid;
    border-image: linear-gradient(#2563eb, #dc2626) 1;
    border-image-outset: 15px;
    padding: 12px;
  }
</style>

<div>15px outset</div>
Try It Yourself

How It Works

  1. Reserve a border. border: 12px solid; gives the image a real width to sit on.
  2. Add the image. border-image with a gradient and slice 1 paints that border.
  3. Push it out. border-image-outset: 15px draws the frame 15px beyond the border box on all sides.
  4. Layout stays put. The content box does not grow; only the paint extends outward.

Example 2 — Number Multiplier

Use a unitless number so outset scales with the border width.

CSS
<style>
  div {
    border: 8px solid;
    border-image: linear-gradient(to right, #7c3aed, #2563eb) 1;
    border-image-outset: 1.5;
    padding: 12px;
  }
</style>

<div>1.5 × border width</div>
Try It Yourself

How It Works

  1. Set an 8px border. That width is the base for the multiplier.
  2. Apply the gradient border image. Same pattern as the length example.
  3. Use a number. 1.5 means 1.5 × 8px = 12px of outset on each side.
  4. Scale together. If you later change the border width, the outset distance follows automatically.

Example 3 — Different Vertical and Horizontal Outset

Two values: top and bottom first, then left and right.

CSS
<style>
  div {
    border: 10px solid;
    border-image: linear-gradient(135deg, #059669, #dc2626) 1;
    border-image-outset: 4px 16px;
    padding: 12px;
  }
</style>

<div>4px vertical, 16px horizontal</div>
Try It Yourself

How It Works

  1. Keep a border image. Width and gradient still set up the frame.
  2. Read two values like margin. 4px is top and bottom; 16px is left and right.
  3. See the asymmetry. The sides stick out farther than the top and bottom.
  4. Four values if needed. For full control, use top, right, bottom, left in that order.

Edge Cases & Pitfalls

If the frame does not move, or it clips oddly, check these first.

image

No border image, no visible outset

Outset only moves a border image. Set border-image (or source plus slice) before you expect to see anything.

size

Layout size does not grow

Outset is paint only. Neighboring text or buttons can look covered. Add margin equal to the outset when you need clear space.

events

Outside paint ignores clicks and overflow

The part outside the border box does not capture pointer events and does not create scrollbars. Do not rely on it as a hit target.

clip

Parents with overflow can clip it

overflow: hidden on an ancestor can cut off the outward frame even though outset itself does not trigger overflow.

reset

border resets the image

The border shorthand sets border-image back to none. Declare the image (and outset) after border.

Browser Support

border-image-outset is a browser CSS property for decorative borders. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

border-image-outset

Chrome 15+, Firefox 15+, Safari 6+, Edge 12+, Internet Explorer 11+. Available across browsers since July 2015.

97% Global support
Google Chrome 15+
Full support
Mozilla Firefox 15+
Full support
Apple Safari 6+
Full support
Microsoft Edge 12+
Full support
Opera 15+
Full support
Samsung Internet 1.0+
Full support
Internet Explorer 11
Full support
border-image-outset Widely supported

Bottom line: Safe for production decorative frames. Pair it with a border image and enough margin. It is not a runtime API.

Key Takeaways

  • Role: draw the border image outside the border box without changing layout size.
  • Values: lengths for fixed distance; numbers as a multiple of border-width.
  • Needs an image: without border-image, outset has nothing to move.
  • Initial value: 0. Not inherited. Negative values are invalid.

One line: border-image-outset paints the frame farther out — after you have a border image, and usually after you add margin for clearance.

Frequently Asked Questions

It sets how far the border image is drawn outside the element’s border box. The layout size of the element does not grow.
The initial value is 0, so the border image stays on the border box until you set a positive outset.
You need a border image first (border-image or border-image-source plus slice). Without a source and a non-zero border width, outset has nothing to paint.
A length such as 12px is a fixed outward distance. A unitless number multiplies the border-width on that side — for example, 1.5 with an 8px border means 12px of outset.
No. The part drawn outside the border box does not receive pointer events and does not create overflow scrollbars. Nearby content can still look overlapped, so add margin if you need clear space.
It is Baseline Widely available: Chrome 15+, Firefox 15+, Safari 6+, Edge 12+, and Internet Explorer 11. It is a browser CSS property, not a Node.js feature.

Next: border-image-repeat

Control how the edge slices stretch, repeat, or round along each side.

border-image-repeat tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful