XML technologies / CSS / Advanced websites with CSS / CSS property reference / outline-width

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

An element’s outline (outline) is similar to its border (border). However, it occupies no space in the CSS box model and therefore does not affect other elements’ positions. Also, outline does not create a rectangular box around the element, but follows the irregular edge of a paragraph. Unlike its border, the outline of a multiline inline element always extends from the start to the end of each line.

The property outline-width describes the outline’s line thickness.

Inherited: no

See also: border-width

Values

thin, medium, thick or a valid CSS measurement.

Default value: medium

Compatibility

CSS version: 2

Works only in Internet Explorer 5 for Macintosh and Opera 7, and, contrary to the CSS2 specification, only as a rectangular outline.

Example

The following example creates a three-pixel-thick grey outline of style outset around hyperlinks when the mouse pointer is over them:

a:hover {
 outline-style: outset;
 outline-color: grey;
 outline-width: 3px;
}

  

 

 

 

back to top