The Text-Indent Property


The text-indent property specifies the indentation of the first line of a paragraph. In a left-to-right language, such as English or French, the indentation is added to the left of the first line. In a right-to-left language, such as Arabic or Hebrew, it is added to the right of the first line.

Name:

text-indent

Value:

<length> | <percentage>

Initial:

0

Applies to:

block-level elements

Inherited:

yes

Percentages:

refer to parent element's width


This property has two values:

  • A length An absolute or relative number.

  • A percentage A percentage of the width of the paragraph; for example, 10% means indent the first line by 10 percent of the width of the paragraph.

text-indent is an inherited property. Only the computed value is passed on. That is, the amount of indentation is computed once for the parent element and the result is inherited by all of its children. The value is not computed again in its child elements even if they have a different font size. For example, if the current font size of the parent element is 10pt and the amount of indentation is set to 2em, child elements will inherit an indent of 20pt, no matter what their own font size is (10pt x 2 = 20pt). Negative values are allowed, although some browsers may not be able to display them.



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

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