Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets or retrieves up to three separate listStyle properties of the object .
Syntax
{ list-style : sStyle } |
object . style.listStyle [ = sStyle ] |
Possible Values
sStyle | String that specifies or receives up to three of the following values, in any order:
|
The property is read/write. The property has a default value of disc outside none . 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 listStyle property is a composite property. When specifying both the type and image values, the image value takes precedence, unless the image value is set to none or the image pointed to by the URL cannot display.
The listStyle property also applies to all elements on which the display property is set to list-item . To make the bullet points appear, you must explicitly set the margin property or set the listStylePosition property to inside on these elements.
Examples
The following examples use the list-style attribute and the listStyle property to set the list style.This example uses ul and UL.compact as selectors in an embedded (global) style sheet to define the styles of two different unordered lists. For UL.compact to override the image that is set with the ul selector, you must explicitly set the image attribute to none .
<STYLE> UL { list-style : outside url(dot.gif) }
This example uses inline scripting to change the style of the list. If the default image cannot be located, a hollow circle is used.
<UL onmouseover="this.style. listStyle ='url(dot.gif) circle'">The following example sets the display property to list-item , a new possible value as of Internet Explorer 6, to demonstrate that the listStyle property can also apply to elements on which the display property is set.
<SPAN onmouseover="this.style.display='list-item'">A line of text...</SPAN>Standards Information
This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) .
Applies To
|
LI , OL , runtimeStyle , style , UL |
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |