Style outlineOffset Property
Examples
Specify an outline 15px outside the border edge:
document.getElementById("myDIV").style.outlineOffset="15px";
Try it Yourself »
Definition and Usage
The outlineOffset property offsets an outline, and draws it beyond the border edge.
The outline differs from the border in two aspects:
- Outlines do not take up space
- Outlines may be non-rectangular
Browser Support
![]()
All major browsers except Internet Explorer support the outlineOffset property.
Syntax
Return the outlineOffset property:
object.style.outlineOffset
Set the outlineOffset property:
object.style.outlineOffset="length|initial|inherit"
Property Values
| Value | Description |
|---|---|
| length | The distance of the outline from the border edge. The default value is 0. |
| initial | Sets this property to its default value. Seeinitial。 |
| inherit | Inherits this property from its parent element. Seeinherit。 |
Technical Details
| Default value: | 0 |
|---|---|
| Return value: | A string, representing the outline-offset property of an element. |
| CSS Version | CSS3 |
Related Articles
CSS Reference:outline-offset property
Other Extensions
Style Object