XML technologies / CSS / Advanced websites with CSS / Text effects and cascading / Styling lists with CSS / The list-style-image property

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

List markers can also be replaced with images, using the property list-style-image. Its only valid value is a relative or absolute address pointing to a browser-compatible GIF, JPEG or PNG image. The following figure shows list-style-image in use.

We created a rule in our stylesheet that assigns our list items a value for the property list-style-image:

ul {
  list-style-image: url(bilder/ball.gif);
}

Images as list markers with list-style-image

Figure: Images as list markers with list-style-image.

Note that URLs in stylesheets must always use CSS format. We use the operator url and put the path in parentheses.

  

 

 

 

back to top