Properties 405
CSS
Properties
Web Design in a Nutshell, eMatter Edition
This property specifies an amount of space to be added between characters.
Note that when specifying relative lengths (such as em, which is based on
font size), thecalculatedsize will be passed down to child elements, even if
they have a smaller font size than the parent.
text-decoration
Values:
none|underline|overline|line-through|blink
Example:
A: link, A:visited, A:active { text-decoration: underline }
Applies to:
All elements
Inherited:
No, but browsers should display elements as matching their parents
This applies a “decoration” to text such as underlines, overlines (a line over
the text), strike-throughs, and the ever-beloved blinking effect.
vertical-align
Values:
baseline|bottom|middle|sub|super|text-bottom|text-top|
top|percentage
Example:
IMG.capletter { vertical-align: text-top }
Thevertical-alignproperty, as it sounds, affects the vertical alignment of
an element. The possible values are as follows:
baseline
Aligns the baseline (or bottom) with the baseline of the parent element
(this is the default)
bottom
Aligns the bottom of the element with the lowest element on the line
middle
Aligns the “vertical midpoint of the element (typically an image) with the
baseline plus half the x-height of the parent” (in the words of the CSS1
Specification)
sub
Makes the element a subscript
super
Makes the element a superscript
text-bottom
Aligns the bottom of the element with the bottom of the parent element’s
font (its descenders)