Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS3 outline-offset property

CSS3 outline-offset property

Example

Set the outline 15px outside the border edge:

div

{

border:2px solid black;

outline:2px solid red;

outline-offset:15px;

}

Try it »


Browser support

The numbers in the table indicate the first browser version that supports this property.

A number immediately before -webkit-, -ms-, or -moz- indicates the first browser version that supports that prefixed property.

property
outline-offset 4.0 Incompatible 3.5 3.1 10.5

Property definition and usage

The outline-offset property sets the offset of the outline frame outside the border edge.

Outlines differ from borders in two ways:

Default value: 0
Inherited: no
Version: CSS3
JavaScript syntax: object.style.outlineOffset="15px"

Syntax

outline-offset:

length

|inherit:

Value Description
length The distance between the outline and the border edge.
inherit Specifies that the value of the outline-offset property should be inherited from the parent element.

Related Articles

CSS3 tutorial: CSS3 User Interface