Openwave Mobile Browser 6.1 and 6.2: XHTML Mobile Profile and CSS Reference

Section 29 out of 38 total sections
Current chapter: CSS Reference

Text Properties

The text style properties affect a number of aspects of how text is displayed, such as how it is indented and aligned.



text-indent

Sets the width of the indention of the first line of text.

Values

em, ex, cm, mm, in, pt, pc, px, %, auto, inherit

For more information, see Units of Measure, Percentage, and Keywords.

Default Value

0

Useful For

Block elements.

Inherited

Yes.

Example
p {text-indent: 2em}

Indents the first line of each paragraph 2 ems.



text-align

Sets the horizontal alignment of lines of text.

Values

left, right, center, inherit

See Keywords for more information about inherit.

Default Value

left

Useful For

Block elements.

Inherited

Yes.

Example
h3 {text-align: center}

Centers third-level headings.



text-decoration

Sets underlining and blinking of text.

Values

none, underline, blink, inherit

Default Value

none

Useful For

All elements that contain text.

Inherited

No.

Example
h1 {text-decoration: underline}

Underlines all first-level headings.



letter-space

Specifies how much space is inserted between characters, in addition to the normal space between characters.

Values

normal, em, ex, cm, mm, in, pt, pc, px, inherit

For more information, see Units of Measure and Keywords.

Default Value

normal

Useful For

All elements.

Inherited

Yes.

Notes

This CSS2 property is not part of the WAP CSS specification.

This property is not supported by the Openwave SDK.

Example
h1 {letter-space: 1pt}

Adds an extra point of space between each letter in first-level heads.



word-space

Specifies how much space is inserted between words, in addition to the normal space between words.

Values

normal, em, ex, cm, mm, in, pt, pc, px, inherit

For more information, see Units of Measure and Keywords.

Default Value

normal

Useful For

All elements.

Inherited

Yes.

Notes

This CSS2 property is not part of the WAP CSS specification.

This property is not supported by the Openwave SDK.

Example
h1 {word-space: 0.3em}

Adds a 0.3 ems of extra space between words in first-level heads.



text-transform

Openwave Mobile Browser does not use this WCSS property.



white-space

Determines how white space, that is, spaces and carriage returns, are handled in text. Normally, the browser treats both carriage returns and multiple consecutive space characters as a single space character, thus "collapsing" any amount of white space to a single space (the <code> and <pre> elements are exceptions to this rule, as described in <code> and <pre>).

Values

normal, pre, nowrap, inherit

For more information on inherit, see Keywords.

Default Value

normal

Useful For

Bock elements.

Inherited

Yes.

Notes

The values have the following effect:

Example
li.scroll {white-space: nowrap}

Causes list items whose class attribute is set to scroll to scroll across the screen when the user selects them.