CSS border-image-outset Property

Beginner
⏱️ 6 min read
📚 Updated: Jun 2026
🎯 4 Examples
Box Model & Layout

What You’ll Learn

The border-image-outset property controls how far a border image extends outside the element’s border box. Use it to make decorative borders appear larger and more prominent.

01

Outset Distance

Push border outward.

02

Default 0

No extra extension.

03

Length Values

px, em, rem.

04

Numbers

Border-width multiplier.

05

Four Values

Per-side control.

06

border-image

Works with image borders.

Definition and Usage

The border-image-outset CSS property sets the distance by which the border image area is drawn outside the element’s border box. When the value is greater than zero, the border image can protrude beyond the normal border edge, creating a bolder frame effect.

This property is part of the border-image family. It does not change the element’s layout box size, but the visual border can extend outward and overlap nearby content if spacing is not accounted for.

💡
Beginner Tip

Compare border-image-outset: 0; with border-image-outset: 12px; on the same box to see how the border image grows outward without changing the element’s width or height.

📝 Syntax

border-image-outset accepts one to four length or number values:

syntax.css
selector {
  border-image-outset: <length> | <number>;
}

/* top | right | bottom | left */
selector {
  border-image-outset: top right bottom left;
}

Basic Example

border-image-outset.css
.border-box {
  width: 300px;
  height: 200px;
  border: 10px solid transparent;
  border-image: url("border-image.png") 30;
  border-image-outset: 10px;
}

Syntax Rules

  • One value applies the same outset to all four sides.
  • Two values set vertical sides first, then horizontal sides.
  • Three values set top, horizontal sides, then bottom.
  • Four values follow top, right, bottom, left order.
  • A unitless number multiplies the computed border width on that side.

⚡ Quick Reference

QuestionAnswer
Initial value0
Applies toBorder image area outward extension
InheritedNo
AnimatableNo
Common useDecorative frames that extend beyond the box edge

Default Value

The default value of border-image-outset is 0. That means the border image stays aligned with the border box and does not extend outward unless you set an outset value.

💎 Property Values

border-image-outset accepts length values and unitless numbers.

ValueExampleMeaning
Lengthborder-image-outset: 10px;Fixed outward distance such as px, em, or rem
Numberborder-image-outset: 2;Multiplier of the border width on each side
Multiple valuesborder-image-outset: 5px 15px;Different outsets per side using shorthand order
initialborder-image-outset: initial;Resets to the default value of 0
inheritborder-image-outset: inherit;Inherits the value from the parent element

Common Value Types

8pxfixed length
22 × border width
4px 12pxvertical | horizontal

0 vs Outset Comparison

border-image-outset: 0;

border-image-outset: 14px;

border-image-outset vs related properties

PropertyTargetsBest for
border-image-outsetOutward extension of the border imageMaking image borders protrude beyond the box
border-image-widthWidth of the border image area inside the borderSizing the border image relative to the border box
border-image-sliceHow the source image is dividedCutting corners and edges from the source artwork
border-imageFull border image shorthandSetting source, slice, width, outset, and repeat together

👀 Live Preview

A box whose gradient border image extends 12px outward:

Uses border: 8px solid transparent;, border-image: linear-gradient(135deg, #2563eb, #dc2626) 1;, and border-image-outset: 12px;.

Examples Gallery

Try border-image-outset with fixed lengths, number multipliers, per-side values, and image borders.

📚 Basic Outset Values

Extend the border image outward on all sides with a fixed pixel value.

Example 1 — 10px Outset on All Sides

Extend the border image by 10 pixels on every side, matching the reference tutorial.

border-image-outset-basic.html
<style>
  .border-box {
    width: 300px;
    height: 200px;
    border: 10px solid transparent;
    border-image: linear-gradient(135deg, #2563eb, #dc2626, #059669) 1;
    border-image-outset: 10px;
    background: #fff;
  }
</style>

<div class="border-box"></div>
Try It Yourself

How It Works

The border image is painted 10 pixels beyond the border box on each side, making the frame look larger without changing the element’s content box dimensions.

Example 2 — Number Multiplier

Use a unitless number to multiply the border width for the outset distance.

border-image-outset-number.css
.frame {
  border: 8px solid transparent;
  border-image: linear-gradient(to right, #7c3aed, #2563eb) 1;
  border-image-outset: 2;
  padding: 1rem;
}
Try It Yourself

How It Works

With an 8px border, border-image-outset: 2; pushes the image outward by 16px on each side.

🎨 Per-Side and Image Borders

Control outset on individual sides or combine with image sources.

Example 3 — Different Outset on Vertical and Horizontal Sides

Use two values to set vertical outsets first, then horizontal outsets.

border-image-outset-sides.css
.panel {
  border: 6px solid transparent;
  border-image: linear-gradient(135deg, #059669, #dc2626) 1;
  border-image-outset: 4px 16px;
  padding: 1rem;
}
Try It Yourself

How It Works

The first value applies to top and bottom; the second applies to left and right. This creates an asymmetric outward frame.

Example 4 — Image Border with Outset

Combine an image source with outset for a decorative frame that extends beyond the box.

border-image-outset-image.css
.border-box {
  width: 300px;
  height: 200px;
  border: 10px solid transparent;
  border-image: url("/images/apple.png") 30;
  border-image-outset: 10px;
}
Try It Yourself

How It Works

The sliced image border extends 10 pixels outside the border box, creating a more prominent decorative frame around the element.

🧠 How border-image-outset Works

1

A border image is applied

You set border-image with a source and slice value first.

Prerequisite
2

You set an outset value

A length or number tells the browser how far to draw the image outside the border box.

CSS rule
3

The image extends outward

The border image is painted beyond the normal border edge while layout size stays the same.

Visual effect
=

Extended border frame

Your element gets a bolder decorative border that protrudes outside the box.

Modern Browser Support

The border-image-outset property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.

Baseline · Modern browsers

Border image outset in today’s browsers

Chrome, Edge, Firefox, Safari, and Opera support border-image-outset in current versions.

96% Modern browser support
Google Chrome15+ · Desktop & Mobile
Full support
Mozilla Firefox15+ · Desktop & Mobile
Full support
Apple Safari6+ · macOS & iOS
Full support
Microsoft Edge12+ · All versions
Full support
Opera15+ · Modern versions
Full support
border-image-outset property 96% supported

Bottom line: Use border-image-outset for decorative image borders in modern projects. Test layout spacing when large outsets overlap nearby elements.

Conclusion

The border-image-outset property is a useful tool for extending border images beyond the element’s border box. By adjusting length or number values, you can create bolder frames and more pronounced decorative effects.

Experiment with single values, multipliers, and per-side outsets to find the look that best fits your design while leaving enough space for surrounding content.

💡 Best Practices

✅ Do

  • Apply border-image before setting outset values
  • Leave extra spacing when large outsets may overlap neighbors
  • Use number multipliers when outset should scale with border width
  • Compare 0 and a positive outset while designing
  • Test on mobile where overlap is more likely in tight layouts

❌ Don’t

  • Expect visible results without a border image source
  • Use very large outsets without checking nearby clickable elements
  • Confuse border-image-outset with border-image-width
  • Assume outset changes the element’s layout width or height
  • Forget that outward borders can be clipped by overflow: hidden on parents

Key Takeaways

Knowledge Unlocked

Five things to remember about border-image-outset

Use these points when extending border images outward.

5
Core concepts
02

Default 0

No extension.

Default
📏03

px or Number

Length or multiplier.

Values
🔀04

1 to 4 Values

Per-side control.

Syntax
🛠05

Needs border-image

Part of image borders.

Usage

❓ Frequently Asked Questions

The border-image-outset property sets how far the border image extends outside the element's border box. A value of 0 keeps the image inside the normal border area.
The initial value is 0, which means the border image does not extend beyond the border box unless you set an outset value.
border-image-outset only has a visible effect when a border image is applied through border-image or border-image-source with a slice value.
A length such as 10px sets a fixed outward distance. A unitless number multiplies the border width — for example, 2 with a 10px border means 20px of outset.
Yes. You can use one to four values in top, right, bottom, left order, just like margin or padding shorthand.

Practice in the Live Editor

Open the HTML editor, try border-image-outset, and preview extended border images instantly.

HTML Editor →

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.

5 people found this page helpful