nested lists e.g. 1 2 2.1 2.2..

windows

Guest
Folks,<br />
<br />
I have been searching and searching but to no avail.<br />
<br />
Q: How do I code in HTML to produce a nested list such as follows:<br />
<br />
1. Oranges<br />
2. Apples<br />
2.1 US<br />
2.2 Macintosh<br />
2.2.1 Red<br />
2.2.2 Green<br />
3. Grapes<br />
<br />
I hope you know what I mean.<br />
<br />
Please help.<br />
<br />
Regards,<br />
Bhagirath<!--content-->Not possible, I'm afraid. (Not automatically, anyway.)<br />
<!-- m --><a class="postlink" href="http://www.jalfrezi.com/lists.htm">http://www.jalfrezi.com/lists.htm</a><!-- m --><!--content-->The last post was very correct, HTML 4.0+ still does not accomadate this type of list. It would be very useful however.<br />
<br />
But don't despair. There are ways around this. Perhaps these aren't the best solutions but if you need them that bad you can try these suggestions.<br />
<br />
1] Type the list up in MS Word and then save the page in HTML. What it will look like I have no idea but it's worth a shot.<br />
<br />
2] Use a table, 2 cols and as many rows as you need. The left one obviously thinner. Make sure the left width accomadates enough space. I would suggest you type your list out using the <tt> </tt> tag (teletype text) meaning the font is monospaced. Also bare in mind you can still nest a <font> tag inside the <tt> one. This gives you control over the spacing to a certain extent. Remember to use non-breaking spaces: &nbsp; i.e.:<br />
<br />
<tt><br />
1.<br />
2. <br />
&nbsp;&nbsp;&nbsp;2.1 <br />
&nbsp;&nbsp;&nbsp;2.2 <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.2.1<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.2.2 <br />
3.<br />
</tt><br />
<br />
That might suffice. It's not the best way, but it's about using round about methods to achieve what you normally can't.<!--content-->
 
Back
Top