Skip to content
Tutorials Center
My learning

Topics

CSS Reference ยท Borders, Outlines and Shadows

The border-image-outset property

Reference for the CSS border-image-outset property: push a border image outward past the border box with numbers or lengths, with a live example and notes.

The border-image-outset property moves the border image outward, away from the border box. With an outset of 0 (the default) the image sits exactly on the border. With a positive outset the image area grows on every chosen side, so the frame is drawn partly or completely outside the box.

The outset is purely visual. It does not push neighbouring elements away, does not add scrolling space and cannot be clicked: nearby content may be painted over by the image. Leave enough margin when you use it.

CSS
.frame {
  border-image-outset: 10px;
}

Try it

Outset moves the frame outward

Syntax

CSS
border-image-outset: [ <length [0,โˆž]> | <number [0,โˆž]> ]{1,4};
  • Initial value: 0
  • Applies to: all elements, except internal table elements when border-collapse is collapse
  • Inherited: no
  • Animatable: yes, by computed value
  • Computed value: four values, each a number or an absolute length

Values

Value Description
<length> A distance outward, such as 8px. Negative values are invalid.
<number> A multiple of the matching border-width. 1 pushes the image out by one full border width.
One to four values Top, right, bottom, left, in the same pattern as margin.

Usage notes

  • No percentages. Only lengths and plain numbers are allowed.
  • Overflow. The extended image is painted outside the box, so an ancestor with overflow: hidden can clip it.
  • Spacing. Because it takes no layout space, add margin so the frame does not collide with siblings.
  • Typical use. A decorative frame that should not shrink the content, or a gradient "glow" ring around a button.
  • Not the same as outline-offset. An outline can be moved away with outline-offset and follows rounded corners; a border image outset draws a square image.

Browser support

Supported in every current browser.