list-style-image

Sets a value that indicates which image to use as a list-item marker for the object.

{ list-style-image: sLocation }

sLocation

String that specifies or receives one of the following values:

none

Default. No image is specified.

url(sURL)

Location of the image, where sURL is an absolute or relative URL.

The property has a default value of none and is inherited.

The list-style-image property can be applied to any element when margin and display:list-item are applied.

When the image is available, it replaces the marker that is set with the list-style-type 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.

The following example uses the list-style-image property to set the image for markers. This example uses the UL element as a selector in an embedded (global) style sheet to set the marker to the dot.gif image:

<style>
    ul {list-style-image:url(dot.gif)}
</style>

LI, OL, UL

Community Additions

ADD
Show: