list-style-position
The list-style-position CSS property sets the position of the ::marker relative to a list item.
It is often more convenient to use the shorthand list-style.
Note: This property is applied to list items, i.e., elements with display: list-item;. By default this includes
- or
- ] to let it apply to all list items.
Note that there is variance among browsers regarding behavior when a block element is placed first within a list element declared as list-style-position: inside. Chrome and Safari both place this element on the same line as the marker box, whereas Firefox, Internet Explorer, and Opera place it on the next line. For more information on this, see bug36854.
CSS list-style-position Property
❮
Reference ❯
Example
Specify the position of the list-item markers:
ul.a {
list-style-position: outside;
}
ul.b {
list-style-position: inside;
}
CSS list-style Property
❮
Reference ❯
Example
Specify all the list properties in one declaration:
ul
{
list-style: square inside url["sqpurple.gif"];
}