Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets or retrieves the indentation of the first line of text in the object .
Syntax
{ text-indent : sIndent } |
object.style.textIndent [ = sIndent ] |
Possible Values
sIndent | Variant that specifies or receives one of the following values:
|
The property is read/write for all objects except the following, for which it is read-only: currentStyle . The property has a default value of 0 . The Cascading Style Sheets (CSS) attribute is inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties .
Remarks
The property can be negative. An indent is not inserted in the middle of an object that was broken by another object, such as br in HTML.
Examples
The following examples use the text-indent attribute and the textIndent property to indent the object's text.This example uses calls to an embedded style sheet to change the indent on the text when an onclick event occurs. The text was originally indented 2 centimeters using div as a selector in the style sheet.
<STYLE>This example uses inline scripting to indent the text within the div when an onmouseover event occurs.
<DIV onmouseover=this.style. textIndent ="2cm" : </DIV>Standards Information
This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) .
Applies To
|
BLOCKQUOTE , BODY , BUTTON , CENTER , currentStyle , DD , DFN , DIR , DIV , DL , DT , FIELDSET , FORM , hn , HR , ISINDEX , LI , LISTING , MARQUEE , MENU , OL , P , PLAINTEXT , PRE , runtimeStyle , style , TABLE , TD , TH , TR , UL , XMP |
Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |