Skip to: content, navigation

by Tommy Olsson and Paul O’Brien

list-style-position (CSS property)

Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Full Full Full Full
Spec
Inherited Initial Version
Yes outside CSS1

Example

This style rule makes the markers for all items within the list with ID "compact" appear on the inside:

#compact li {
  list-style-position: inside;
}

Try it yourself!View all demos

Description

This property specifies where the list marker is rendered with respect to the list item’s principal block box.

Value

outside
The value outside causes the list marker to be rendered outside the principal block box. Its precise location isn’t defined by the CSS2.1 specification. Contemporary browsers seem to render it approximately 1.5em to the left of the principal block box in a left-to-right environment, or 1.5em to the right of the principal block box in a right-to-left environment. Some browsers use padding on the list to make room for the marker box, while others use a margin.
inside
The value inside makes the list marker the first inline box in the principal block box. Its exact location is not defined by the CSS2.1 specification.

Compatibility

IE5.5Full
6.0Full
7.0Full
Firefox1.0Full
1.5Full
2.0Full
Safari1.3Full
2.0Full
3.0Full
Opera9.2Full
9.5Full

Internet Explorer for Windows versions up to and including 7 don’t support the value inherit.

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters