5.10. List Properties

Cascading style sheets allow you to customize the way list items are formatted in ordered lists (OL), unordered lists (UL), and definition lists (DL). These properties are not supported by Internet Explorer version 3, and Netscape 4 supports only the list-style-type property.

list-style-image

none | url(filename)

This property allows you to set your own “bullets” for lists. However, this property is only supported by Internet Explorer. The value should be a URL or the keyword none. For instance, the following would set the default bullet for unordered lists to be a diamond, plus set up a “star” class that can be used in unordered lists to get a star as a bullet.

 UL { list-style-image: url(diamond.gif) } UL.star { list-style-image: ...

Get Core Web Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.