outline

Defines the properties for an outline drawn over the outer edge of an element. Outlines differ from borders in that borders are drawn to the outside of the element.

Platform Support

IENetscapeMozillaOperaSafari
no6.0+no7.0+1.2+
  • Safari: Support for "outline" in Safari is "buggy".

Usage

[color] [style] [width]

Values

inheritInherit the value from the parent element.
#ffffffoutline-color: Color placeholder. e.g. #ffffff = white
noneoutline-style: No outline.
dottedoutline-style: Dotted line.
dashedoutline-style: Dashed line.
solidoutline-style: Solid line.
doubleoutline-style: Double line.
grooveoutline-style: Grooved line.
ridgeoutline-style: Ridged line.
insetoutline-style: Inset line.
outsetoutline-style: Outset line.
hiddenoutline-style: Hidden outline.
thinoutline-width: Thin outline.
mediumoutline-width: Medium outline.
thickoutline-width: Thick outline.

Example

To specify a thick, red, dashed outline, use the following syntax: .myoutlineclass {outline: thick red dashed;}.

For a demonstration of the outline attributes, see the demo page on quirksmode:

http://www.quirksmode.org/css/outline.html

Remarks

Use the outline property as a shortcut to typing out all of the individual outline properties separately. You can specify any valid value for a outline property as part of outline.

Availability

W3C CSS2

Related

text_css aptana_docs