[thelist] Re: CSS to bold *just* the number on an <li>

Clive R Sweeney clive at designshift.com
Thu Oct 17 12:26:01 CDT 2002

At 17:40 2002.10.17, aardvark wrote:

>i have a list...
>i want the numbers to be bold, but not the text...
>i feel like an idiot because i can't figure out the CSS necessary to do

>it... although i thought i had done it before, i was wrong...

Apparently this is easy to do in NN4, where "Styling an <li> directly
only styles the marker." ("Cascading Style Sheets: Separating Content
from Presentation").

But as pandion has suggested the only way I can see to accomplish this
for all browsers is to style the list with a font-weight of bold and
then apply the normal font-weight to the content of each list item.
However - and please correct me if I'm wrong - I think it's better to
use a <span> within a list item than a <p>.

... clive

More information about the thelist mailing list