Visit Mozilla.org

CSS:outline

From MDC

« CSS Reference

[edit] Summary

The outline property is a shorthand property for setting the individual outline property values in a single place in the style sheet. outline can be used to set the values for one or more of: outline-width, outline-style, outline-color.

In browsers previous to Gecko 1.8 (Firefox 1.5) a similar effect can be achieved using Mozilla CSS Extension -moz-outline.

[edit] Syntax

outline: [outline-width || outline-style || outline-color | inherit] ;

[edit] Values

border-width
See outline-width.
border-style 
See outline-style.
border-color 
See outline-color.

[edit] Examples

View Live Examples

element { 
  outline: 1px solid #000;
}

[edit] Notes

While the outline-width, outline-style, and outline-color properties accept up to four values, this property only accepts one value for each property.

[edit] Specifications

[edit] Browser compatibility

Browser Lowest Version
Internet Explorer ? (not in 7)
Firefox 1.5
Netscape ?
Opera ?
Safari 1.2

[edit] See also

outline, outline-width, outline-style, outline-color, outline-offset, -moz-outline, -moz-outline-color, -moz-outline-radius, -moz-outline-radius-topleft ,-moz-outline-radius-topright, -moz-outline-radius-bottomleft, -moz-outline-radius-bottomright, -moz-outline-style, -moz-outline-width, -moz-outline-offset