outline-color (CSS property)
Example
This style rule assigns a
red outline color on focus to anchor elements within
the element with ID "example":
#example a:focus {
outline-color: red;
outline-style: solid;
}
Description
The
outline-style property sets the style of the outline
that’s drawn around an element. See outline for more
information about outlines.
Note that an outline will only show when
outline-style has been set with a value other than
none.
Value
outline-color
accepts any valid CSS color value, as well as the keyword
invert. invert does as its name
suggests: it performs a pixel-color inversion of the outline in order that
the outline remains visible regardless of any background colors that have
been set. As of CSS2.1, user agents have been allowed to ignore the
invert value, and instead use the element’s
color property.
Compatibility
| IE | 5.5 | None |
|---|---|---|
| 6.0 | None | |
| 7.0 | None | |
| Firefox | 1.0 | None |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
| 9.5 | Full |
Internet Explorer for Windows (up to and including
version 7) and Firefox 1.0 provide no support for
outline.
User-contributed notes
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

