CSS list-style-image – use image as marker in list

The property list-style-image sets the image that will be used as the list item marker. When list-style-image set and image is available, it will replace the marker set with the list-style-type marker.

CSS property list-style-image

CSS version: CSS 2.1
Value: uri | none | inherit
Initial: none
Applies to: elements with 'display: list-item'
Inherited: yes

Example – list-style-image

<style>
ul {
  background-color: lightgreen;
  width: 200px;
  list-style-image: url("/img/star_10x10.png");
}
li {background-color:lightgray;}
</style>
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
refresh

Related

Specification

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments