Log in

View Full Version : Continuing a numbered list



JohnK
11-23-2006, 02:45 PM
Hi there,

Probably a bit of easy question (I'm a newbie!) but,

I've got the following code:

<ol>
<li>
<p>demonstrate knowledge and understanding of business terminology, concepts, principles and theories</p>
</li>
<li>
<p>make business decisions by identifying the issue(s), selecting and interpreting data, applying appropriate tools and techniques,
and recommending suitable solutions
</p>
</li>
<li>
<p>analyse and evaluate business decisions using a variety of sources</p>
</li>
<li>
<p>evaluate business strategies and/or practices showing evidence of critical thinking</p>
</li>
<li>
<p>apply skills and knowledge learned in the subject to hypothetical and real business situations</p>
</li>
<li>
<p>communicate business ideas and information effectively and accurately using appropriate formats and tools.</p>
</li>
</ol>
<p>In addition to the above, students at HL will be expected to:</p>

<ol>
<li>
<p>synthesize knowledge in order to develop a framework for business decision-making.</p>
</li>
</ol>


and want to ensure (via CSS) that the bold list continues the numbering sequence from the list above ie becomes "7." even though it's separated by a para. Is this possible, either by some connection to the list above via a nesting <div> or by manually starting at 7? I've looked into tutorials about increments and counting/re-setting but can't work it out.

Thanks in advance.

John

mwinter
11-23-2006, 11:00 PM
Use the start or value attributes (http://www.w3.org/TR/html4/struct/lists.html#h-10.2). Alternatively, rework the document so that restarting the list numbers makes sense, or even remove the number entirely: use an unordered list. Unless an item is cited directly, it doesn't really seem necessary, based on what you posted, to keep the numbers at all.

Mike

JohnK
11-27-2006, 11:27 AM
Thanks, mwinter. I probably should have mentioned that I'm tranforming from an xml source so I'll probably need to change the xsl to insert "start" or "value" attibutes into the list. I was just wondering if this could be done via just css.

Re. the content. Sadly, I'm tied to producing the lists in this way due to author demands!

John

mwinter
11-27-2006, 02:09 PM
I was just wondering if this could be done via just css.

It can, but the necessary features aren't supported.

Using a combination of markers and counters, one can completely restyle just about anything - for example, section numbers could be added to headings and paragraphs. Whilst Gecko-based browsers and Opera support counters, I'm not aware of anything that supports markers and the result would look odd without the latter.

Though the subject is purely academic, the CSS 2 specification discusses markers, counters, and generated content in 12 Generated content, automatic numbering, and lists (http://www.w3.org/TR/REC-CSS2/generate.html).

Mike

motormichael12
11-27-2006, 10:14 PM
in lists you dont need the </li>... not on my editor anyway. if you mean just continue numbering on lists, I used this and it made it appear as the second code box...


<OL TYPE="1">
<LI>test
<LI>test2<br>
this shoudl be unnumbered and i am making it extremely long just so that you can see it does the word wrap thing and doent make the next line on the next number.
<LI>test3
<LI>test4<br>
this shoudl be unnumbered too.
<LI>test5
</OL>


that appeared as


test
test2
this shoudl be unnumbered and i am making it extremely long just so that you can see it does the word wrap thing and doent make the next line on the next number.
test3
test4
this shoudl be unnumbered too.
test5

mwinter
11-27-2006, 11:23 PM
in lists you dont need the </li>

There are many elements in HTML for which start- and/or end-tags are optional, however most people - including myself - include them. It's a choice, but there's never a reason not to include an end-tag for an element that doesn't use have an EMPTY content model. The same cannot be said for omitting them as they are required for some elements.



... not on my editor anyway.

Your editor doesn't determine the syntax for HTML. :)



if you mean just continue numbering on lists, I used this and it made it appear as the second code box...

The OP posted what he meant: to end a list, then, when starting a new one, to continue the numbering from the previous list. That's not the same as inserting a forced line break (br element).

Mike