XML technologies / CSS / Advanced websites with CSS / CSS property reference / list-style-position

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

The property list-style-position positions list markers either outside or inside the list contents. The following figure illustrates both options.

Positioning list markers with list-style-position

Figure: Positioning list markers with list-style-position.

Inherited: Yes

See also: list-style

Values

inside or outside

Default value: outside

Compatibility

CSS version: 1

Works in all CSS-capable browsers except Netscape 4. Internet Explorer 4 for Macintosh has display problems with inside.

Example

The following rule places list markers for ordered and unordered lists of the class kompakt inside the text block and removes the left indentation automatically applied to lists:

ul.kompakt, ol.kompakt{
 list-style-position: inside;
 margin-left: 0;
}

  

 

 

 

back to top