Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

list-style-position

Sets a variable that indicates how the list-item marker is drawn relative to the content of the object.

{ list-style-position: sPosition }

sPosition

String that specifies or receives one of the following values:

outside

Default. Marker is placed outside the text, and any wrapping text is not aligned under the marker.

inside

Marker is placed inside the text, and any wrapping text is aligned under the marker.

The property has a default value of outside. The cascading style sheet property is inherited.

The list-style-position property can be applied to any element when margin and display:list-item are applied.

If the left margin of a list item is set to 0 using one of the margin properties, the list-item markers do not show. The margin should be set to a minimum of 30 points.

The following example uses the list-style-position property to set the position for markers. This example uses the UL and UL.COMPACT elements as selectors in an embedded (global) style sheet to set the position of the list-item markers:

<style>
    ul {list-style-position:inside}
    ul.compact {list-style-position:outside}
</style>
</head>
<body>
<ul>
    <li>... 
    <li>... 
</ul>
<ul class=compact>
    <li>... 
    <li>...
</ul>

LI, OL, UL

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.