Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. list-style-image

list-style-image

Displays the marker of li elements (and elements with 'display' set to 'list-item' or 'inline-list-item') using a specified image.

Sample Code

li.test { list-style-image: none;}
li.test1 { list-style-image: url(/sample.png);}

Available Values

ValueDescription
noneNo image is used as the marker. This is the initial value.
image pathDisplays the specified image as the marker.

Browser Display Result

The samples below use the following image (30px wide, 30px tall).

<ul style="list-style-image: none;">
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
</ul>

<ul style="list-style-image: url(/dics/dictionary-css/img/list-style-image_1.png);">
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
</ul>

Browser Compatibility

Chrome Chrome
1+
Firefox Firefox
1+
Safari Safari
1+
Edge Edge
12+
Supported in all versions
IE IE
11
10
9
8
7
6
Opera Opera
7+
6 and earlier ×
iOS Safari iOS Safari
1+
Android Android Browser
4.4+
3 and earlier ×
Chrome Android Chrome Android
Latest
Same support as desktop
Firefox Android Firefox Android
Latest
Same support as desktop

※ Version data is based on MDN.

Details

Displays the marker of li elements (and elements with 'display' set to 'list-item' or 'inline-list-item') using a specified image.

When using an image marker, the marker and text may not align properly, as shown below.

<ul style="list-style-image: url(/dics/dictionary-css/img/list-style-image_1.png);">
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
	<li>This is a li element.</li>
</ul>

If you want to align the marker image and text properly, consider using the 'background' property to display the image as a background, then adjust the position using the 'padding', 'height', and 'line-height' properties.

<p>The li elements below use 'list-style-type: none', 'background: url(/dics/dictionary-css/img/list-style-image_1.png) no-repeat', 'padding-left: 30px', 'height: 30px', 'line-height: 30px'.</p>
<ul>
	<li style="list-style-type: none; background: url(/dics/dictionary-css/img/list-style-image_1.png) no-repeat; padding-left: 30px; height: 30px; line-height: 30px;">This is a li element.</li>
	<li style="list-style-type: none; background: url(/dics/dictionary-css/img/list-style-image_1.png) no-repeat; padding-left: 30px; height: 30px; line-height: 30px;">This is a li element.</li>
	<li style="list-style-type: none; background: url(/dics/dictionary-css/img/list-style-image_1.png) no-repeat; padding-left: 30px; height: 30px; line-height: 30px;">This is a li element.</li>
	<li style="list-style-type: none; background: url(/dics/dictionary-css/img/list-style-image_1.png) no-repeat; padding-left: 30px; height: 30px; line-height: 30px;">This is a li element.</li>
	<li style="list-style-type: none; background: url(/dics/dictionary-css/img/list-style-image_1.png) no-repeat; padding-left: 30px; height: 30px; line-height: 30px;">This is a li element.</li>
</ul>

If you find any errors or copyright issues, please .