Text Properties

Probably the most common reason people think of stylesheets is to format text, so I'll start with the CSS text properties.

letter-spacing

  • CSS1 values: normal<length>

  • CSS2 values: inherit

  • Default value: normal

  • Element support: All elements

  • Browser support: [IE4, IE5, IE6]

  • Style inherited: Yes

This property sets the spacing between text characters . It is implemented in Internet Explorer, but the implementation appears to be a little spotty.

line-height

  • CSS1 values: normal<number><length><percentage>

  • CSS2 values: inherit

  • Default value: normal

  • Element support: All elements

  • Browser support: [IE3, IE4, IE5, IE6, NS4, NS6]

  • Style inherited: Yes

This property gives the minimum height of the element's box. Usually it is used to specify single or double spacing.

text-align

  • CSS1 values: leftrightcenterjustify

  • CSS2 values: <string>inherit

  • Default value: Varies

  • Element support: Block-level elements

  • Browser support: [IE3, IE4, IE5, IE6, NS4, NS6]

  • Style inherited: Yes

This property indicates the alignment of the content of a block: left , right , center , or justify . Note that in CSS2, you can specify a string to align with respect to.

text-decoration

  • CSS1 values: None[underlineoverlineline-throughblink]

  • CSS2 values: inherit

  • Default value: None

  • Element support: All elements

  • Browser support: [IE3, IE4, IE5, IE6, NS4, NS6]

  • Style inherited: No

This property indicates the "decorations" for text display, including underlining, overlining, and line-through (strike-through). The blink value is not implemented anywhere yet, as far as I know.

text-indent

  • CSS1 values: <length><percentage>

  • CSS2 values: inherit

  • Default value: 0

  • Element support: Block-level elements

  • Browser support: [IE3, IE4, IE5, IE6, NS4, NS6]

  • Style inherited: Yes

This property indicates the indentation of the first line of text. Note that this property applies only to block-level elements (which you set with display: block ).

text-shadow

  • CSS2 values: None[<color><length><length><length>?,]*[< color ><length><length><length>?]inherit

  • Default value: None

  • Element support: All elements

  • Browser support: [IE5, IE6]

  • Style inherited: No

This property gives a comma-separated list of shadow effects that should be used for text.

vertical-align

  • CSS1 values: baselinesubsupertoptext-topmiddlebottomtext-bottom<percentage><length>

  • CSS2 values: inherit

  • Default value: baseline

  • Element support: Inline-level and table cell elements

  • Browser support: [IE4, IE5, IE6]

  • Style inherited: No

This property indicates the vertical alignment of text in the element. For example, setting this value to text-top and using a larger initial character in a block of text is how you create drop caps.

white-space

  • CSS1 values: normalprenowrap

  • CSS2 values: inherit

  • Default value: normal

  • Element support: Block-level elements

  • Browser support: [NS4, NS6]

  • Style inherited: Yes

This property indicates how whitespace should be handled. Theoretically, setting this property to pre should be like setting xml:space to preserve .

word-spacing

  • CSS1 values: normal<length>

  • CSS2 values: inherit

  • Default value: normal

  • Element support: All elements

  • Browser support: [None]

  • Style inherited: Yes

This property sets the spacing between words. So far, however, it's not implemented anywhere, as far as I know.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net