<ol>
<li>test</li>
<li>test</li>
</ol>
will show as:
- test
- test
I want to have numbers coloured and text black!
I can edit the css, but I do not have access to the HTML.
<ol>
<li>test</li>
<li>test</li>
</ol>
will show as:
I want to have numbers coloured and text black!
I can edit the css, but I do not have access to the HTML.
@kdgregory 's code worked for me, but it affected my bulleted lists. I changed
li
tool li
to prevent the bullet items from being affected. Like so:P.S. I also prefer to use uppercase in CSS for elements like
BODY
so I can easily distinguish it from classes.body
and ids#body
.It's a bit late for this but I want to share it with the community, took me a long while to do this. I found a solution to change the OL numbers background and color that works on every browser. Requires an extra tag inside the
li
.See it here
This is easy, as long as you don't want to assign different colours to different list item numbers. No HTML modifications necessary. Might not work in 100% of browsers though..
too bad you can't edit the html... how about js?
if not, maybe a good-enough solution would be
This should do what you're looking for:
http://archivist.incutio.com/viewlist/css-discuss/67894
HTML
CSS
Except you'll want to change the color and background according to your design.
This next one is overkill, but gives you a great deal of information on how to style lists:
http://print.wordpress.com/2006/02/22/css-beautifully-numbered-lists/
-Adam