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

(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-style describes the outline’s shape.

Inherited: no

See also: border-style

Values

The same constants as for border-style (see the table CSS constants for different border styles), except hidden.

Default value: none

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 rule creates a grey, medium-width outline of style inset around activated hyperlinks:

a:active {
 outline-style: inset;
 outline-color: grey;
 outline-width: medium;
}

  

 

 

 

back to top