Style listStylePosition Property
Example
Indent the list-item marker:
document.getElementById("myUL").style.listStylePosition = "inside";
Try it Yourself »
Description
The listStylePosition property sets or returns the position of the list-item marker.
Browser Support
Property | |||||
---|---|---|---|---|---|
listStylePosition | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the listStylePosition property:
object.style.listStylePosition
Set the listStylePosition property:
object.style.listStylePosition = "outside|inside|initial|inherit"
Property Values
Value | Description |
---|---|
outside | The list-item marker will be rendered before any text content. This is default |
inside | Indents the list-item marker marker |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Technical Details
Default Value: | outside |
---|---|
Return Value: | A String, representing the position of the list-item marker |
CSS Version | CSS1 |
More Examples
Example
Return the position of the list-item marker:
alert(document.getElementById("myList").style.listStylePosition);
Try it Yourself »
Related Pages
CSS tutorial: CSS List
CSS reference: list-style-position property
HTML DOM reference: listStyle property
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.