CSS PROPERTIES
Expand All|Collapse All
CSS AT-RULES
SPONSORED LINKS

CSS list-style-position Property

Topic: CSS3 Properties Reference« Prev|Next »

Description

The list-style-position CSS property specifies the position of list-item marker with respect to the list item's principal block box.

The following table summarizes the usages context and the version history of this property.

Default value: outside
Applies to: List items
Inherited: Yes
Animatable: No. See animatable properties.
Version: CSS 1, 2, 3

Syntax

The syntax of the property is given with:

list-style-position: 
inside | outside | initial | inherit

The example below shows the list-style-position property in action.

  • ol {
  •     list-style-position: inside;
  • }
  • ul {
  •     list-style-position: outside;
  • }

Property Values

The following table describes the values of this property.

Value Description
inside The list marker is placed as the first inline box in the principal block box, before the element's content.
outside The list marker is placed outside the principal block box. This is default.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element list-style-position property.

Browser Compatibility

The list-style-position property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 4+
  • Apple Safari 1+
  • Opera 4+

Further Reading

See tutorial on: HTML List, CSS Lists.

Related properties: list-style, list-style-image, list-style-type.

 
Close

Your Feedback:

 

We would love to hear from you! Please say something.