Style listStylePosition property
- Pagina precedente listStyleImage
- Pagina successiva listStyleType
- Torna alla pagina precedente Oggetto Style HTML DOM
Definition and usage
listStylePosition
Sets or returns the position of the list item marker.
See also:
CSS Tutorial:Elenco CSS
CSS Reference Manual:list-style-position property
HTML DOM Reference Manual:listStyle property
Instance
Example 1
Indent the list item marker:
document.getElementById("myUL").style.listStylePosition = "inside";
Example 2
Return the position of the list item marker:
alert(document.getElementById("myList").style.listStylePosition);
Syntax
Return the listStylePosition property:
object.style.listStylePosition
Set the listStylePosition property:
object.style.listStylePosition = "outside|inside|initial|inherit"
Attribute value
Value | Description |
---|---|
outside | The list item marker will be presented before any text content. Default. |
inside | Indent the list item marker. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | outside |
---|---|
Return value: | A string that represents the position of the list item marker. |
CSS version: | CSS1 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supporto | Supporto | Supporto | Supporto | Supporto |
- Pagina precedente listStyleImage
- Pagina successiva listStyleType
- Torna alla pagina precedente Oggetto Style HTML DOM