mozilla

Revision 356765 of list-style-image

  • Revision slug: CSS/list-style-image
  • Revision title: list-style-image
  • Revision id: 356765
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The list-style-image CSS property sets the image that will be used as the list item marker. It is often more convenient to use the shorthand {{ cssxref("list-style") }}.

  • {{ Xref_cssinitial() }} {{ Cssinitial("list-style-image") }}
  • Applies to elements with display:list-item
  • {{ Xref_cssinherited() }} yes
  • Media {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }} absolute URI or none

Syntax

Formal syntax: {{csssyntax("list-style-image")}}
list-style-image: none
list-style-image: url(http://www.example.com/images/list.png)

list-style-image: inherit

Values

<uri>
Location of image to use as the marker.
none
Default value

Examples

{{ CSSLiveSample("list-style") }}

ul { list-style-image: url("images/arrow.gif") }

Specifications

Specification Status Comment
{{ SpecName('CSS3 Lists', '#list-style-image', 'list-style-image') }} {{ Spec2('CSS3 Lists') }} Extends support to any {{ xref_cssimage() }} data type.
{{ SpecName('CSS2.1', 'generate.html#propdef-list-style-image', 'list-style-image') }} {{ Spec2('CSS2.1') }} Initial definition.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{ CompatGeckoDesktop("1") }} 4.0 7.0 1.0
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1.0 {{ CompatGeckoMobile("1") }} 6.0 6.0 1.0

See also

  • {{ Cssxref("list-style") }}, {{ Cssxref("list-style-type") }}, {{ Cssxref("list-style-position") }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>list-style-image</code> CSS property sets the image that will be used as the list item marker. It is often more convenient to use the shorthand {{ cssxref("list-style") }}.</p>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}</dfn> {{ Cssinitial("list-style-image") }}</li>
  <li><dfn>Applies to</dfn> elements with <code>display:list-item</code></li>
  <li><dfn>{{ Xref_cssinherited() }}</dfn> yes</li>
  <li><dfn>Media</dfn> {{ Xref_cssvisual() }}</li>
  <li><dfn>{{ Xref_csscomputed() }}</dfn> absolute URI or <code>none</code></li>
</ul>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("list-style-image")}}
</pre>
<pre>
list-style-image: none
list-style-image: url(http://www.example.com/images/list.png)

list-style-image: inherit
</pre>
<h3 id="Values">Values</h3>
<dl>
  <dt>
    <code>&lt;uri&gt;</code></dt>
  <dd>
    Location of image to use as the marker.</dd>
  <dt>
    <code>none</code></dt>
  <dd>
    Default value</dd>
</dl>
<h2 id="Examples">Examples</h2>
<p>{{ CSSLiveSample("list-style") }}</p>
<pre>
ul { list-style-image: url("images/arrow.gif") }
</pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('CSS3 Lists', '#list-style-image', 'list-style-image') }}</td>
      <td>{{ Spec2('CSS3 Lists') }}</td>
      <td>Extends support to any {{ xref_cssimage() }} data type.</td>
    </tr>
    <tr>
      <td>{{ SpecName('CSS2.1', 'generate.html#propdef-list-style-image', 'list-style-image') }}</td>
      <td>{{ Spec2('CSS2.1') }}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{ CompatGeckoDesktop("1") }}</td>
        <td>4.0</td>
        <td>7.0</td>
        <td>1.0</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{ CompatGeckoMobile("1") }}</td>
        <td>6.0</td>
        <td>6.0</td>
        <td>1.0</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ Cssxref("list-style") }}, {{ Cssxref("list-style-type") }}, {{ Cssxref("list-style-position") }}</li>
</ul>
Revert to this revision