NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix b » css1 / css2 properties

outline-color


This property accepts all CSS color values as discussed earlier in the appendix as well as in Appendix E. The keyword invert is also supported and should perform a color inversion on the pixels on the screen.

Examples


p:hover {outline-style: dashed; outline-color: green;}
.test {outline-width: 10px; outline-style: solid; outline-color: #f00;}

Browser and CSS Support Notes


CSS2
No IE support
Nav 6, 7 use a proprietary style
Opera 7


outline-style


This property defines a style for an element's outline, which is generally the same as its border-style. While outlines resemble borders, they are not supposed to take up canvas space, and theoretically could appear as a different shape than borders, potentially wrapping around the edges of content. Since outlines are drawn over an item, rather than around it, there is no reflow. The allowed values for this property are the same as border-style and include none, dotted, dashed, solid, double, groove, ridge, inset, and outset. See border-style property for specific information on each style.

Examples


p:hover {outline-style: dashed;}
.test {outline-width: 10px; outline-style: solid; outline-color: black;}

Browser and CSS Support Notes


CSS2
No IE support
Nav 6, 7 use a proprietary style
Opera 7


outline-width


This property defines a width for an element's outline, which is generally the same as its border-width. While outlines resemble borders, they are not supposed to take up canvas space, and theoretically could appear as a different shape than borders. Furthermore, outlines are drawn over an item, rather than around it, thus causing no reflow. Like border-width, this property's values can be keywords (thin, medium, or thick) and numerical lengths such as pixels (px), inches (in), and so on.

Examples


p {outline-style: dashed; outline-width: thick;}
.test {outline-width: 10px; outline-style: solid; outline-color: black;}

Browser and CSS Support Notes


CSS2
No IE support
Nav 6, 7 use a proprietary style
Opera 7

(X)HTML Elements
CSS Properties
Back: outline Next: overflow
< Home | About | Chapters | Examples | Errata | Reference | Site Map >