tags:

views:

68

answers:

2

When I use this in my css to achieve square bullets:

li { list-style-type: square; }

it affects all numbered lists as well, as they both use <li>

The context is within a sharepoint richhtmlfield control.

Is there a way around this or have Microsoft not implemented numbered lists correctly?

+5  A: 

You can specify the parent of the <li>s to apply the styles to, thus only affecting unordered lists (<ul>):

ul li { list-style-type: square; }
Paolo Bergantino
That won't work with an ol inside a ul. I'd suggest using ul {}.
Ms2ger
A: 

I don't know how well you can control the HTML from sharepoint, but..

If you use <ol> for the ordered and <ul> for the squared lists, you could just use

ul li {list-style-type: square;}

If you use <ol> for both, you'll have to give the squared list a class eg.

<ol class="un_ordered"><li>first item</li></ol>

and to css

.un_ordered li {list-style-type: squared;}
Marcus