Quick Tip – Simplify List Margins with CSS
# Linked to 18 October 2009, 22:42 in Tips by Kevin Holesh
By default, list item markers have a negative positioning in relationship to the list item itself. This means that zero-ing out margins automatically leads to an overflow if the list is contained inside anything else.
Wouldn’t it be easier to put the list item marker at the same starting point as other elements instead? Lucky for us, there’s a style to help do just that. Meet the
list-style-positionproperty.
Tweet Subscribe to the RSS Feed →