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


This property is a shorthand form that sets all outline properties at once. Outlines resemble borders but take up no additional space, and can be set to a shape different from that of the image, form field, or other element to which they are applied. Outlines are drawn over an item, rather than around it, thus causing no reflow. The shorthand syntax is as follows:

outline: outline-color outline-style outline-width;
While outlines are similar to borders, their individual sides cannot be set. All outline properties, both specific and shorthand, apply to the whole outline.


p:hover {outline: dashed;}
.test {outline: green solid 10px;}

Browser and CSS Support Notes

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

TIP Mozilla also supports an outline style with a proprietary syntax: -moz-outline.

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