CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES

CSS outline-style Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The outline-style CSS property sets the style of the outline of an element. However, in many cases the shorthand 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: none
Applies to: All elements
Inherited: No
Animatable: No. See animatable properties.
Version: CSS 2, 3

Syntax

The syntax of the property is given with:

outline-style: 
none | dotted | dashed | solid | double | groove | ridge | inset | outset | initial | inherit

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

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

Property Values

The following table describes the values of this property.

Value Description
none No outline will be displayed. This is default value.
dotted Displays the outline as a series of dots.
dashed Displays the outline as a series of short line segments i.e. dashes.
solid Displays the outline as a single solid line.
double Displays the outline as a two parallel solid lines with some space between them. The sum of the two lines and the space between them equals the value of outline-width.
groove Displays the outline as it were carved into the canvas. It gives the impression of 3D that is typically achieved by creating a shadow from two colors that are slightly lighter and darker than the outline-color.
ridge Displays the outline that has the opposite effect of groove. It also gives the impression of 3D, the outline looks as though it were coming out of the canvas.
inset Displays the outline that makes the element's box look as though it were embedded in the canvas. It gives the impression of 3D that is typically achieved by creating a shadow from two colors that are slightly lighter and darker than the outline-color.
outset Displays the outline that has the opposite effect of inset. It also gives the impression of 3D, the outline makes the box look as though it were coming out of the canvas.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element outline-style property.

Browser Compatibility

The outline-style 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-color, outline-width.

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