asp.net.ph

Skip Navigation Links

list-style-position Attribute | listStylePosition Property

CSS Attributes Index   Classification Attributes


Sets or retrieves how the list-item marker is drawn in relation to the object’s content.

Syntax


CSS { list-style-position: 'outside' | 'inside' }
Script object.style.listStylePosition = sPosition ]

Possible Values


outside The marker is placed outside the text ( any wrapping text is not aligned under the marker ).
inside The marker is placed inside the text ( any wrapping text is aligned under the marker ).

The property is read/write with a default value of outside; the CSS attribute is inherited.

Remarks

This property is applicable only on objects with a display value of list-item.

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

Example

The following example demonstrates the effects of applying the different values possible for the CSS list-style-position attribute. This feature requires Microsoft® Internet Explorer® 4.0 or later.

<ul style="list-style-position: inside">
   <li>this is the first item in the list
   <li>and this is the second list item
</ul>

 Show me 

The sample below uses inline event handlers to dynamically set an object’s listStylePosition in response to mouse events.

<ul onmouseover="this.style.listStylePosition='inside'"
   onmouseout="this.style.listStylePosition=''">
   ,,,
</ul>

This feature requires Microsoft® Internet Explorer® 4.0 or later.

 Show me 

Applies To

currentStyle, LI, OL, runtimeStyle, style, UL

See Also

list-style, list-style-image, list-style-type



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note