Easy Tutorial
❮ Dom Obj Param Jsref Round ❯

Style outlineWidth Property


Definition and Usage

The outlineWidth property sets or returns the width of the outline around an element.

Syntax

Setting the outlineWidth property:

Returning the outlineWidth property:

Value Description
thin Defines a thin outline.
medium Default. Defines a medium outline.
thick Defines a thick outline.
length Defines the width of the outline using units like px, cm, etc.
inherit The width of the outline is inherited from the parent element.

Browser Support

All major browsers support the outlineWidth property.

Note: IE7 and earlier versions do not support the outlineWidth property. IE8 only supports outlineWidth if !DOCTYPE is specified. IE9 supports the outlineWidth property.


Tips and Notes

The outline is a line around the element. It is displayed around the element's margin. However, it is different from the border property.

The outline is not part of the element's dimensions, so the element's width and height properties do not include the width of the outline.


Example

Change the width of the outline:


❮ Dom Obj Param Jsref Round ❯