The outline-offset property allows you to insert a space between the border and outline of an element.

The outline-offset property for an element can be styled just like the border property. However, it is not included as part of the box-model and therefore not added to the width of the element being displayed. The outline is typically rendered right outside the border with no space between the border and the outline. 

Generally outlines defer from borders in two ways:

  • Outlines do not take up space
  • Outlines may be non-rectangular

Syntax:

selector { 

    outline-offset: length | initial | inherit;

}

Values:

The main value of the outline-offset property is length (number, percentage), but the complete list of values is:

  • length; Defines the distance between outline and outset of border (default value is 0).
  • initialinherit

Example

The example with outline-offset property:

 

›› go to examples ››