Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested Lists in html?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
can I use numbered nested lists in html?
I don't mean to use the <ul> tag to get nested un-numbered lists, I'm trying to make something like:

1. Test 1
1.1. Test 1.1
1.2. Test 1.2
1.2.1. Test 1.2.1
2. Test 2
3. Test 3

and so on...

I can't find no way of doing this in Html, is there a way?

TIA
 
I don't think this is possible, but check this code:

<ol type=&quot;1&quot;>
<li>Item 1
<li>Item 2

<ol type=&quot;A&quot;>
<li>Item 2.A
<li>Item 2.B
</ol>

<li>Item 3
</ol>

you can use other values for the TYPE attribute, the values are: 1, a, A, i, I
 
but if you want to indent, you must use blockquotes

<blockquote>
<ol>
<li>element 1</li>
<blockquote>
<ol>
<li> Element 1.1</li>
</ol>
</blockquote>
<li>Element 2</li>
</ol>
</blockquote> Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
well that's more or less what I've achieved, but I really need the structure like that. I mean

1.
1.1.
1.2.
2.

I cannot have A,B,C instead of 1.1, 1.2, 1.3.

That would be really annoying if this isn't possible in HTML :(
 
well that's more or less what I've achieved, but I really need the structure like that. I mean

1.
1.1.
1.2.
2.

I cannot have A,B,C instead of 1.1, 1.2, 1.3.

That would be really annoying if this isn't possible in HTML :(
 
just one thing. Do you use a server-side language to generate the pages, or you have HTML static files? Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Hi mate,

Give this a try and let me know if it will do the job..

<OL>
<LI>This is #1.
<UL>
1.1 Whatever you want in here.<br>
1.2 Whatever you want in here.
</UL>
<LI>This is #2.
<UL>
2.1 Whatever you want in here.<br>
2.2 Whatever you want in here.
</UL>
<LI>This is #3.
<UL>
3.1 Whatever you want in here.<br>
3.2 Whatever you want in here.
</UL>
</OL>

Hope this helps Wullie

sales@freshlookdesign.co.uk

 
Anikin: I'm developing VB application to generate the pages, this is an application to automatically create some documentation in HTML format. Then the htmls will be distributed with the app.

wullie: Yes, that would work, I was thinking on using something like that, the problem is I'd need to build the indexes by myself. If there was an automatic solution it would be cleaner.

 
if you are using something to generate the pages, you can always use programming and loops to generate the numbers, and if you don't like blockquotes, generate indents using some nbsp's.

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
yeah... I can do that, but I was trying to avoid it. It seems it will be the only way though :(
 
How often does the information in the nested lists change?

I is different for each user request or is it more like a presentation of a document?

 
Well, it's never the same. Basically it depends on some options the user must do.
I can have up to 4 levels in the list and all with a variable amount of items, it's nothing with fixed size.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top