outline-offset
Widely availableSince 201797% of users
Adds space between the edge of the element and the outline. Positive values push the outline away, negative values pull it inside.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyClassicIt has worked everywhere since April 2017.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
0- Inherited
- No
- Applies to
- all elements
- Animation type
- length
Quick example
a:focus {
outline: 2px solid blue;
/* Adds a 4px gap between the link text and the outline */
outline-offset: 4px;
}outline-offset browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2017.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
1+
1.5+
1.2+
15+Mobile
18+Android
4+Android
1+iOS