Welcome to WebmasterWorld Guest from 54.226.67.166

Forum Moderators: incrediBILL

Message Too Old, No Replies

Continue Ordered List

Continuing an ordered list in XHTML

     

SimTech

6:01 pm on Oct 4, 2010 (gmt 0)



I was only able to find limited info on how to do this and there are several different ways to do it but All seem to be a little confusing or you have to learn a new way of doing things. It's actually even easier than you think. What you're doing is basically "pausing" a list so you can insert something. When

you do this in text you use the <div> tag. (Bells ringning now?")

CSS
...

/* This style removes the indentation that <ol> creates. In my document it was 30pt */
.pauselist {margin-left:-30pt;}


XHTML
...
<p>Text</p>
<p>Text</p>
<ol>
<li>Item 1</li>
<li>Item 2
<div class="pauselist">
<p>Text</p>
<p>Text</p>
<p>Text</p>
<!-- Okay now let's continue with the list -->
</div>
</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
<p>Text</p>
<p>Text</p>

------ Results ---------
Text
Text

1. Item 1
2. Item 2

Text
Text
Text

3. Item 3
4. Item 4

Text
Text

milosevic

2:23 pm on Oct 5, 2010 (gmt 0)

5+ Year Member



[w3schools.com...]

See "start" attribute. It's deprecated but should still work and there's no alternative other than JavaScript I believe.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month