O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

outline-offset

Values:

<length>

Initial value:

0

Applies to:

All elements

Inherited:

No

Computed value:

An absolute length value

Description:

Defines the offset distance between the outer border edge and inner outline edge. Only one length value can be supplied and it applies equally to all sides of the outline. Values can be negative, which causes the outline to “shrink” inward toward the element’s center. Note that outline-offset cannot be set via the shorthand outline.

Examples:

*[href]:focus {outline-offset: 0.33em;}
form:focus {outline-offset: −1px;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required