XML technologies / CSS / Advanced websites with CSS / CSS property reference / outline-color
(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-color describes the outline’s colour.
Inherited: no
See also: border-color
Values
Any valid CSS colour value or invert (uses the opposite of the background colour)
Default value: invert (black in all current browsers)
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. Both browsers use black as the default because they do not support invert.
Example
The following example creates a red outline around hyperlinks when the mouse pointer is over them:
a:hover {
outline-style: solid;
outline-color: red;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg