Visit Mozilla.org

CSS:list-style-position

From MDC

« CSS Reference

[edit] Summary

list-style-position specifies the position of the marker box in the principal block box.

[edit] Syntax

list-style-position: inside | outside | inherit

[edit] Values

outside 
The marker box is outside the principal block box.
inside 
The marker box is the first inline box in the principal block box, after which the element's content flows.

[edit] Examples

  <ul>
    <li>Lorem ipsum dolor sit amet, consectetuer
        adipiscing elit, sed diam nonummy nibh 
        euismod tincidunt ut laoreet dolore magna 
        aliquam erat.</li>
  </ul>

With below styles:

li {
   list-style-position: inside;
   border: 1px solid #000;      /* Border color helps to see the difference
                                   between inside and outside */
}

Will display like this: image:List-style-position_inside.png

Above HTML with these styles:

 li {
   list-style-position: outside;
   border: 1px solid #000;      /* Border color helps to see the difference
                                   between inside and outside */
 }

Will display like this: image:list-style-position_outside.png

[edit] Specifications

[edit] Browser Compatibility

[edit] See Also

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