Latest web development tutorials

CSS list-style-position property

Examples

A predetermined position in the list the list of items labeled:

ul
{
list-style-position: inside;
}

try it"

Attribute definitions and instructions

list-style-position property indicates how the contents of the object relative to the list item marker drawing.

Outside:

  • Coffee
  • Tea
  • Coca-cola

Inside:

  • Coffee
  • Tea
  • Coca-cola

Defaults: outside
inherit: yes
version: CSS1
JavaScript syntax: object .style.listStylePosition = "inside"


Browser Support

Figures in the table represent the first browser to support the version number of the property.

属性
list-style-position 1.0 4.0 1.0 1.0 3.5

Property Value

value description
inside List item tag is placed within the text, and the text according to the surround mark.
outside Defaults. Hold mark to the left of the text. List item marker is placed outside of the text, and not according to the surrounding text mark.
inherit Provisions should inherit the value list-style-position property from the parent element.


related articles

CSS tutorial: CSS list

CSS Reference: List-style property