List(li) bullets does not align consistently across browsers

8 css firefox google-chrome

Here's the fiddle (http://jsfiddle.net/PZgn8/8/). Note that it looks different rendered in Chrome 27 and Firefox 21. I think it's a bug with Firefox, but Firefox gives me the outcome I want.

<ul style="text-align: center;">
    <li>
        <a href="#">One</a>
    </li>
    <li>
        <a href="#">Two</a>
        <ul>
            <li>
                <a href="#">Two's child</a>
            </li>
        </ul>
    </li>
</ul>
Run Code Online (Sandbox Code Playgroud)

Basically, for the child ul within the li, I need its list discs to be at the center too, not the side.

PSL*_*PSL 16

Provide list-style-position:inside to make it appear uniform across browsers, so that the bullet also gets the text-align: center; property.

li
{
    list-style-position:inside;
}
Run Code Online (Sandbox Code Playgroud)

Demo

  • 很好的答案(+1)..`文档`:http://dochub.io/#css/list-style-position和`实例':https://developer.mozilla.org/samples/cssref/list-样式/ (2认同)