In article <ys******************************@comcast.com>,
"deko" <de**@nospam.comwrote:
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>
But your list content is not properly a set of list items, is it?
Each "item" is actually a series of paragraphs. The easiest solution
would be to simply write the number explicitly in the heading.
<h2>1. Download latest WordPress code</h2>
<p>blah blah blah</p>
<h2>2. Next step</h2>
<p>More blah</p>
(Note I've also fixed your headers, which are second-level in the
context of the document who's URL you provided; if you are using
h3 to make the text appear smaller than an h2, don't - that's what
CSS is for!)
If you _really_ want to have the user agent put the numbers in the
headings, then you need to so something like this:
<ol class="mainheadings">
<li">Download latest WordPress code
<ul class="subsectioncontent">
<li>blah</li>
<li>blah</li>
</ul>
</li>
...
</ol>
- but I'm not convinced that stuffing images and text into
unordered list items is such a great idea, either, and still
makes more work by trying to force non-list content into a
list format.
I tried putting the opening <liin the <h3heading, 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 <linumber, not the whole <li?
The short answer is that you're making life more difficult by trying
to make it easier. A quick browse of "list-item" in the CSS spec suggests
that you might need to use a styled <span></spanon the list item
text to get the difference you want. Again, I would ask, why? You
really don't have that many things that need numbering.
(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...)