Specifies if the list-item markers should appear inside or outside the content flow.
Overview tableoutside
listStylePosition
list-style-position: inherit
list-style-position: inside
list-style-position: outside
The following example uses the list-style-position attribute and the list-style-position property to set the position for markers.
.firstlist { list-style-position:inside }
.secondlist { list-style-position:outside }
The following example shows how to change the value dynamically using JavaScript. The value changes from outside to inside when the mouse is over the list
var ul = document.getElementById('list-hover');
ul.addEventListener('mouseover', function () {
ul.style.listStylePosition = 'inside';
});
ul.addEventListener('mouseout', function () {
ul.style.listStylePosition = 'outside';
});
An example to show how setting padding-left to 0 when position is set to outside will produce the market not being shown at all. A ul contained in a div with overflow hidden might run into this issue.
ul {
padding-left: 0;
}
.list-position-outside {
list-style-position: outside;
}
.list-position-inside {
list-style-position: inside;
}
Usage
===Remarks===
If a list-style-position is set to outside and padding-left is set to 0, the marker will not show.
Related specificationslist-style-position
Mozilla Developer Network : Article
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4