Text blocks can have the first line indented. This might be applied to an element that is instantiated by a <P> tag for example.
The value is specified using the normal measurement units such as pixels or floating point fractional em-dash values.
If you want to create a hanging indent effect, the first line can be moved leftwards by specifying a negative value in this property.
Assigning a value of zero to this property restores it to its default condition with all lines being left justified identically.
Negative indents (sometimes called outdents or hanging indents) may not be supported correctly on all browsers on all platforms. You may need to perform some experiments and platform testing to verify it works on your target user's browsers.
Some versions of MSIE on Macintosh do not properly support this feature.
See also: | JSSTag.textIndent, Measurement units |
Prev | Home | Next |
style.textDecorationUnderline | Up | style.textJustify |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |