XML technologies / CSS / Advanced websites with CSS / CSS property reference / text-decoration
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property text-decoration describes the decoration of text elements. It can display text with an overline, underline, strikethrough or blinking effect.
Although this property is not inherited, decoration applies to the entire element and its descendants.
Inherited: no
Values
The following four constants, which can also be combined with spaces between them:
blinkline-throughoverlineunderline
The constant none removes all text decorations specified by parent or lower-priority rules (for example, the default underlining of hyperlinks).
Default value: none
Compatibility
CSS version: 1
Works in all CSS-capable browsers; the constant blink is not supported by Internet Explorer up to version 6.0.
Example
The following rule removes hyperlink underlining and replaces it with a dashed bottom border:
a:link, a:visited {
text-decoration: none;
border-bottom: 1px solid dashed;
}
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