Easy Tutorial
❮ Sel Last Of Type Css3 Pr Filter ❯

CSS outline-width Property

Example

Set the width of the outline:

p {
    outline-style: dotted;
    outline-width: 5px;
}

Property Definition and Usage

The outline is a line drawn around elements, outside the border edge.

outline-width specifies the width of the outline.

Note: Always declare the outline-style property before the outline-width property. An element must have an outline before you can change the width of it.

Default value: medium
Inherited: no
--- ---
Version: CSS2
--- ---
JavaScript syntax: object.style.outlineWidth="thin"
--- ---

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
outline-width 1.0 8.0 1.5 1.2 7.0

Tips and Notes

The outline is around the element. It is around the margin of the element. However, it is different from the border properties.

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


Property Values

Value Description
thin Specifies a thin outline.
medium Default. Specifies a medium outline.
thick Specifies a thick outline.
length Allows you to specify the thickness of the outline.
inherit Specifies that the outline width should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Outline

CSS Reference: outline Property

❮ Sel Last Of Type Css3 Pr Filter ❯