CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES

CSS outline-width Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The outline-width CSS property sets the width of the outline of an element. However in many cases the shorthand CSS propertiey outline is more convenient to use and preferable.

The following table summarizes the usages context and the version history of this property.

Default value: medium
Applies to: All elements
Inherited: No
Animatable: Yes. See animatable properties.
Version: CSS 2, 3

Syntax

The syntax of the property is given with:

outline-width thin | medium | thick | length | initial | inherit

The example below shows the outline-width property in action.

p {
    outline-style: solid;
    outline-width: thick;
}

Note: You must declare the outline-style property before the outline-width property. An element must have outlines before you can set the width of the outline, because the default value of the outline-style property is none.


Property Values

The following table describes the values of this property.

Value Description
thin A thin outline.
medium A medium outline.
thick A thick outline.
length A length value in px, em, etc. Negative values are not allowed.
inherit If specified, the associated element takes the computed value of its parent element outline-width property.

Browser Compatibility

The outline-width property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1.5+
  • Google Chrome 1+
  • Internet Explorer 8+
  • Apple Safari 1.2+
  • Opera 7+

Further Reading

See tutorial on: CSS outline, CSS Border.

Related properties: outline, outline-style, outline-color.

Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties