CSS3 outline-offsetProperty
Example
Specifies the outline 15px outside the border edge:
div
{
border:2px solid black;
outline:2px solid red;
outline-offset:15px;
}
{
border:2px solid black;
outline:2px solid red;
outline-offset:15px;
}
Try it Yourself »
Browser Support
The numbers in the table indicate the first browser version that supports the property.
The number immediately preceding -webkit-, -ms- or -moz- is the first browser version that supports the prefixed property.
| Property | |||||
|---|---|---|---|---|---|
| outline-offset | 4.0 | incompatible | 3.5 | 3.1 | 10.5 |
Property definition and usage instructions
The outline-offset property sets the offset of the outline frame outside the border edge.
Outlines differ from borders in two ways:
- Outlines take up no space
- Outlines may be non-rectangular
| Default value: | 0 |
|---|---|
| Inherited: | no |
| version: | CSS3 |
| JavaScript Syntax: | object.style.outlineOffset="15px" |
Syntax
outline-offset: length|inherit:
| Value | Description |
|---|---|
| length | 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
other extensions