list-style

  • Revision slug: CSS/list-style
  • Revision title: list-style
  • Revision id: 20298
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 5 words removed

Revision Content

{{ CSSRef() }}

Summary

The list-style CSS property is a shorthand property for setting {{ cssxref("list-style-type") }}, {{ cssxref("list-style-image") }} and {{ cssxref("list-style-position") }}.

<style type="text/css"></style>
  • {{ Xref_cssinitial() }}: see individual properties for details
  • Applies to: elements with display: list-item
  • {{ Xref_cssinherited() }}: no
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: see individual properties

Syntax

list-style:  list-style-type || list-style-position || list-style-image 

Values

Accepts one, two or three keywords in any order.

list-style-type
See {{ cssxref("list-style-type") }}
list-style-image
See {{ cssxref("list-style-image") }}
list-style-position
See {{ cssxref("list-style-position") }}

Examples

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

ul { list-style: circle; }
#foo { list-style: square inside; }

Specifications

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-type") }}, {{ Cssxref("list-style-image") }}, {{ Cssxref("list-style-position") }}

{{ languages( { "de": "de/CSS/list-style", "fr": "fr/CSS/list-style", "pl": "pl/CSS/list-style", "es": "es/CSS/list-style" } ) }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3 name="Summary">Summary</h3>
<p>The<code> list-style </code>CSS property is a shorthand property for setting {{ cssxref("list-style-type") }}, {{ cssxref("list-style-image") }} and {{ cssxref("list-style-position") }}.</p>
<nobr>
<style type="text/css"><![CDATA[.cssprop {
  display:table;
  padding: 0.4em;
  border-left:0.15em solid;
  background-color:#eeeeff
}
.cssprop li {
 display:table-row;
 padding: 3px;
 margin:0;
}
.cssprop li dfn {
  display:table-cell;
  padding: 0 5px;
  border-bottom: none;
  cursor:inherit;
}

]]></style>
<ul class="cssprop"> <li><dfn>{{ Xref_cssinitial() }}:</dfn> see individual properties for details</li> <li><dfn>Applies to:</dfn> elements with<code> display: list-item</code></li> <li><dfn>{{ Xref_cssinherited() }}:</dfn> no</li> <li><dfn>Media:</dfn> {{ Xref_cssvisual() }}</li> <li><dfn>{{ Xref_csscomputed() }}:</dfn> see individual properties</li>
</ul></nobr><h3 name="Syntax">Syntax</h3>
<pre>list-style:  list-style-type || list-style-position || list-style-image </pre>
<h3 name="Values">Values</h3>
<dl> <p>Accepts one, two or three keywords in any order.</p> <dt>list-style-type</dt> <dd>See {{ cssxref("list-style-type") }}</dd> <dt>list-style-image</dt> <dd>See {{ cssxref("list-style-image") }}</dd> <dt>list-style-position</dt> <dd>See {{ cssxref("list-style-position") }}</dd>
</dl>
<h3 name="Examples">Examples</h3>
<p>{{ CSSLiveSample("list-style") }}</p>
<pre>ul { list-style: circle; }
</pre>
<pre>#foo { list-style: square inside; }</pre>
<h3 name="Specifications">Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/CSS21/generate.html#propdef-list-style">CSS 2.1 #list-style</a></li> <li><a class="external" href="http://www.w3.org/TR/css3-lists/#list-style">CSS 3 Lists #list-style</a> Working draft</li>
</ul>
<h2>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>
<h3 name="See_Also">See Also</h3>
<p>{{ Cssxref("list-style-type") }}, {{ Cssxref("list-style-image") }}, {{ Cssxref("list-style-position") }}</p>
<p>{{ languages( { "de": "de/CSS/list-style", "fr": "fr/CSS/list-style", "pl": "pl/CSS/list-style", "es": "es/CSS/list-style" } ) }}</p>
Revert to this revision