Styling the number of an ordered list
A notebook entry published on May 14, 2003
A notebook entry published on May 14, 2003
li tag with CSS?
For instance, I’d like to bold the number, but not what’s in the li. Giving font-weight: bold to the ol doesn’t do it. And giving font-weight: bold to the li tag just bolds the whole thing. I realize I could add a span in there, but that seems uneccesary.
Seems like a completely logical thing to do — give the number special treatment like bold or a different color or font size.
I’m waiting for someone to make me feel stupid. And hoping…
Was there ever an answer for this?
Well, your comment now has a bold #1 by it, Gena, so I guess he figured it out. Question is: how?
Josh didn’t look at the source code… The bold #1 is simply so because it’s wrapped in a pair of strong tags. Furthermore, the comments are stored in a definition list, which is not the correct semantic use of such lists.
Chris D - How can you can say a definition list is “not the correct use”? The spec is rather vague, and leaves room for interpretation. Seems a list of comments is a perfectly fine application for them.
You are right Dan, by reading my previous post I realized that it does come across as over confident… I should have used the more cautious approach of “In my humble opinion” as I strictly base my post on that. :)
I did stumble on a SimpleQuiz from a while ago that led to this kind of debate in the comments. BTW, my answer’s C. Too late now for the t-shirt I guess, eh? :P
I based my opinion on Tantek’s recent presentation: The Elements of Meaningful XHTML in which he touches on the subject on page 33. Mind you, I was not lucky enough to attend his presentation, so I am missing on any complementary information he might have added in spoken explanations.
I agree with you that there is room for interpretation. However, I find that the name leaves less of it. A definition list should by definition and in my opinion, contain just that, definitions.
Cheers,
CD
You are right Dan, by reading my previous post I realized that it does come across as over confident… I should have used the more cautious approach of “In my humble opinion” as I strictly base my post on that. :)
I did stumble on a SimpleQuiz from a while ago that led to this kind of debate in the comments. BTW, my answer’s C. Too late now for the t-shirt I guess, eh? :P
I based my opinion on Tantek’s recent presentation: The Elements of Meaningful XHTML in which he touches on the subject on page 33. Mind you, I was not lucky enough to attend his presentation, so I am missing on any complementary information he might have added in spoken explanations.
I agree with you that there is room for interpretation. However, I find that the name leaves less of it. A definition list should by definition and in my opinion, contain just that, definitions.
Cheers,
CD
Comments have been closed for this entry.
A tiny design studio founded by Dan Cederholm. We create simple interfaces balanced with a standards-based methodology, and we’re based in Massachusetts, USA.
Add your own
6 Comments