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);
}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.
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg
back to top