| Inherited | Initial | Version |
|---|---|---|
| No | medium |
CSS2, 2.1 |
| IE7 | FF1.5+ | SA1.3+ | OP9.2+ |
|---|---|---|---|
| None | Full | Full | Full |
Syntax
Description
The
outline-width property sets the width of the outline
that’s drawn around an element. See outline for more
information about outlines.
Note that even though an
outline-width has been set,
outline-style must have a value other than
none before the outline will
show.
Example
This style rule assigns an outline with
a 2px width on focus to anchor elements within the element with ID
"example":
#example a:focus {
outline-width: 2px;
outline-style: solid;
}
Value
The property takes the same values
as border-width—for
example, a CSS length (px, pt, em, and so on) or one of the allowed
keywords—but percentage or negative values are not allowed.
The keyword width values of thin, medium, and thick aren’t explicitly defined—their display will depend on the user agent—but have the following meaning: thin <= medium <= thick.
Compatibility
| Internet Explorer | Firefox | Safari | Opera | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 1.0 | 1.5 | 2.0 | 1.3 | 2.0 | 3.0 | 9.2 | 9.5 |
| None | None | None | None | Full | Full | Full | Full | Full | Full | 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.