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

HTML DOM Style outlineOffset Property

Style outlineOffset Property

Style Object Reference The Style object

Example

Specify an outline 15 pixels outside the border edge:

document.getElementById("myDIV").style.outlineOffset="15px";

Try it »


Definition and Usage

The outlineOffset property offsets the outline and draws it beyond the border edge.

An outline differs from a border in two ways:


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers except Internet Explorer support the outlineOffset property.


Syntax

Return the outlineOffset property:

object

.style.outlineOffset

Set the outlineOffset property:

object

.style.outlineOffset="

length

|initial|inherit"

Attribute values

Value Description
length The distance between the outline and the border edge. The default value is 0.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default value: 0
Return Value: A string representing the element's outline-offset property.
CSS version CSS3

Related Articles

CSS Reference Manual:outline-offset property


Style Object Reference The Style object