[jQuery] Re: list bullet style
i'm not sure i understand... hard-coded numbering? something like this (?) : HTML ul li1 spanList Item/span/li li2 spanList Item/span/li li3 spanList Item/span/li /ul if you are looking for a numbered list, you should be using the ol/ tag, although the ol/ tag is going to have the same limitations... you can set a background image for the numbers, or separate the content into nested span/ tags, but i don't know of any way to bold just the number otherwise... the CSS pseudo-class :first-letter will target the first character, not the bullet or number. On Nov 24, 12:10 am, dnagel grandna...@gmail.com wrote: Not quite what I'm after... Wanted to use the LI's native numbering and be able to bold just that, not the content inside the LI. Right now I have spans inside the LI with hard coded numbering to get the bold effect. I'm just trying to accommodate a client. Putting the spans around the inner content seems like 6 of one to me... Thx, D.
Re: [jQuery] Re: list bullet style
Why not use an ol and wrap the text of each li in a span? It's not pretty, but it works. ol lispanList Item/span/li lispanList Item/span/li lispanList Item/span/li /ol ol li {font-weight: bold; } ol li span {font-weight: normal; } If for some reason you can't put the spans in the actual markup, you could do $('ol li').wrapInner('span/span') --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 24, 2009, at 10:20 AM, KeeganWatkins wrote: i'm not sure i understand... hard-coded numbering? something like this (?) : HTML ul li1 spanList Item/span/li li2 spanList Item/span/li li3 spanList Item/span/li /ul if you are looking for a numbered list, you should be using the ol/ tag, although the ol/ tag is going to have the same limitations... you can set a background image for the numbers, or separate the content into nested span/ tags, but i don't know of any way to bold just the number otherwise... the CSS pseudo-class :first-letter will target the first character, not the bullet or number. On Nov 24, 12:10 am, dnagel grandna...@gmail.com wrote: Not quite what I'm after... Wanted to use the LI's native numbering and be able to bold just that, not the content inside the LI. Right now I have spans inside the LI with hard coded numbering to get the bold effect. I'm just trying to accommodate a client. Putting the spans around the inner content seems like 6 of one to me... Thx, D.
[jQuery] Re: list bullet style
what do you mean by snappy? you could always just use CSS (not sure how this questions relates to jQuery or JavaScript at all) to replace the bullet with your own image: HTML: ul liList Item 1/li liList Item 2/li liList Item 3/li /ul CSS: ul li {list-style-type:none;background:transparent url(path/to/bold- bullet.gif) no-repeat left center;} as far as i know, you can't style just the bullet unless you wrap the li/'s content in some other tag, such as: HTML: ul lispanList Item 1/span/li lispanList Item 2/span/li lispanList Item 3/span/li /ul CSS: ul li {font-weight:bold;} ul li span {font-weight:normal;} but in the last example, you are adding non-semantic span/ tags, which should be avoided where possible. On Nov 21, 1:45 am, dnagel grandna...@gmail.com wrote: Can anyone think of a snappy way to set the font to bold only on the bullet(decimal)? The content of the LI should remain font- weight:normal
[jQuery] Re: list bullet style
Not quite what I'm after... Wanted to use the LI's native numbering and be able to bold just that, not the content inside the LI. Right now I have spans inside the LI with hard coded numbering to get the bold effect. I'm just trying to accommodate a client. Putting the spans around the inner content seems like 6 of one to me... Thx, D.