![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
deko wrote: http://www.liarsscourge.com/ewpi.html The list numbers should be formatted as <h3>, but other text within the <li should be normal text. ol li h3 id="d2">Download latest WordPress code</h3 [other text, images and formatting here] /li /ol I tried putting the opening <li> in the <h3> heading, but that fails validation. [snip] |
|
style li.bold { font-weight : bold; } li.bold span { font-weight : normal; } /style /head body ol li class="bold"><span><h3>Yadda yadda</h3>foo and bar</li></span li class="bold"><span><h3>Bladibla</h3>bar vs foo</li></span /ol /body /html HTH, Sh. Oops, sorry, the <span> tags should be *inside* the <li></li> tags. My bad. |
#3
| |||
| |||
|
| http://www.liarsscourge.com/ewpi.html The list numbers should be formatted as <h3>, but other text within the <li should be normal text. ol li h3 id="d2">Download latest WordPress code</h3 [other text, images and formatting here] /li /ol |
|
I tried putting the opening <li> in the <h3> heading, but that fails validation. I also tried modifying the stylesheet like this: #ewpi li { font-weight:bold; } but that changes the whole <li>, not just the list number. How do I apply formatting to only the <li> number, not the whole <li> ? |
#4
| |||
| |||
|
|
In article <ysSdnWhjA-WPWvDYnZ2dnUVZ_vqdnZ2d (AT) comcast (DOT) com>, "deko" <deko (AT) nospam (DOT) com> wrote: ... (Hmm - is there an html/css option for automatically numbering headers according to their h1/h2/h3/etc occurrence? Have to look that one up, but it would certainly be useful...) |
#5
| |||
| |||
|
|
(Hmm - is there an html/css option for automatically numbering headers according to their h1/h2/h3/etc occurrence? Have to look that one up, but it would certainly be useful...) This is available in CSS2: http://www.w3.org/TR/CSS21/generate.html#counters But I don't know any browser that supports it. |
#6
| |||
| |||
|
| http://www.liarsscourge.com/ewpi.html How do I apply formatting to only the <li> number, not the whole <li> ? |
#7
| |||
| |||
|
|
You have no selector that specifies only part of the list item. You could add <span> tags around the li 'content' and set font-weight for that. |
#8
| |||
| |||
|
|
deko wrote: http://www.liarsscourge.com/ewpi.html How do I apply formatting to only the <li> number, not the whole <li> ? li {font-weight: bold} li * {font-weight: normal} li h3 {font-weight: bold} (or whatever else needs bolding) This does require everything within the li to be in an explicit container, though (hx, div, p, a, etc.) or it will be bolded. |
#9
| |||
| |||
|
|
David Stone escribió: In article <ysSdnWhjA-WPWvDYnZ2dnUVZ_vqdnZ2d (AT) comcast (DOT) com>, "deko" <deko (AT) nospam (DOT) com> wrote: ... (Hmm - is there an html/css option for automatically numbering headers according to their h1/h2/h3/etc occurrence? Have to look that one up, but it would certainly be useful...) This is available in CSS2: http://www.w3.org/TR/CSS21/generate.html#counters But I don't know any browser that supports it. |
#10
| |||
| |||
|
|
On Wed, 29 Nov 2006 22:42:11 +0100, Manuel Collado wrote: David Stone escribió: In article <ysSdnWhjA-WPWvDYnZ2dnUVZ_vqdnZ2d (AT) comcast (DOT) com>, "deko" <deko (AT) nospam (DOT) com> wrote: ... (Hmm - is there an html/css option for automatically numbering headers according to their h1/h2/h3/etc occurrence? Have to look that one up, but it would certainly be useful...) This is available in CSS2: http://www.w3.org/TR/CSS21/generate.html#counters But I don't know any browser that supports it. Dang, I was about to ask questions about that very topic. I think I can make them work under HTML 4.0 transistional but XHTML 1.0 transitional won't verify (can't have the class inside the li tag, must have a closing tag). I'm no HTML/XHTML/CSS expert (in every sense of the word), I just wnat nice 1. and 1.1 and 1.1.1 when I need them without resorting to javascript or php. Anyone got any pointers? |
![]() |
| Thread Tools | |
| Display Modes | |
| |