list-style-image Attribute | listStyleImage Property
Sets or retrieves which image to use as a list-item marker for the object.
Syntax
HTML { list-style-image: sLocation } Scripting object.style.listStyleImage [ = sLocation ]
Possible Values
sLocation String that specifies one of the following values:
none No image is specified. url(sURL) Location of the image, where sURL is an absolute or relative URL. The property is read/write with a default value of 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 dynamic properties.
Remarks
When the image is available, it replaces the marker that is set with the listStyleType marker.
If the left margin of the list item is set to 0 using one of the margin properties, the list-item markers do not show. The margin should be set to a minimum of 30 points.
Example
The following examples use the list-style-image attribute and the listStyleImage property to set the image for markers.
This example uses UL as a selector in an embedded (global) style sheet to set the marker to the dot.gif image.
Sample Code
<STYLE> UL { list-style-image:url(dot.gif) } </STYLE>This feature requires Internet Explorer 4.0 or later. Click the icon below to install the latest version. Then reload this page to view the sample.This example uses inline scripting to change the style of the list-item marker to an image when an onmouseover event occurs.
<UL onmouseover="this.style.listStyleImage='url(dot.gif)'">
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. currentStyle, LI, OL, runtimeStyle, style, UL
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.