/    Sign up×
Community /Pin to ProfileBookmark

Number color on ordered list?

Hey everybody,
I’m working with ordered lists and I was wondering if it’s possible to make the numbers a certain color. I know you can just add [b][i]color: #000;[/i][/b] to the li in the CSS but that colors the numbers and the list content as well. I want it to just color the numbers. Is this possible? I’ve looked around and couldn’t find anything so I’m guessing it’s not but I thought I would ask here for a final confirmation.

Thanks for any help you guys can provide. ?

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@FangJul 21.2004 — Wrap the contents of the li in a span and give that a diferent color.

li {color:#red;}

li span {color:#black;}

<ol>

<li><span>contents</span></li>

</ol>
Copy linkTweet thisAlerts:
@Daniel_TJul 21.2004 — The numbers in an ordered list automatically inherit the [b]color[/b] attribute in the CSS for that list. You [i]could[/i] put the text inside the list-item inside a span, and color the span, though.

[b]**EDIT**[/b]

Oh damnit! Fang is too fast!
Copy linkTweet thisAlerts:
@JickauthorJul 21.2004 — [i]Quoted from Fang's profile [/i]

[B]Resistance is futile [/B][/QUOTE]
:p



Thanks much guys. Thats exactly what I needed. ?
×

Success!

Help @Jick spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.9,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...