Click to See Complete Forum and Search --> : Nested Lists - Alignment


brett
03-10-2003, 03:51 PM
Hello

I am getting frustrated with a nested list:
<ol>
<li>blah blah
</li>
<li><ol>
<li class="listindent">blah blah</li>
<li class="listindent">blah blah</li>
<li class="listindent">blah blah</li>
</ol>
</li>

In other words I want to have 2 (a) and (b)..the problem is how to get the 2 on the same line as the (a)...Viewed in the browser the (a) always drops one line below the '2' making the design of the list look flawed to say the least!!!
Any advice?

Cheers

khalidali63
03-10-2003, 04:15 PM
want to use tables? or create div blocks and pot whatever and wherever you want.

Cheers

Khalid

toicontien
03-12-2003, 05:23 PM
Are you looking for something like this:

1 blah blah
2---1 blah blah
-----2 blah blah
-----3 blah blah

OR

1 blah blah
2
----1 blah blah
----2 blah blah
----3 blah blah

?

In any event, the code you posted (aside from missing a </ol> tag) renders in IE5/Mac like the first example I illustrated above.

The first item in the nested list is on the same line as the second item in the first list.

If you want the first item in the nested list 1 LINE BELOW the second item in the first list, use the code below:

<ol>
<li>blah blah</li>
<li>&amp;nbsp;
<ol>
<li>blah</li>
<li>blah</li>
<li>blah</li>
</ol>
</li>
</ol>

nkaisare
03-12-2003, 05:49 PM
Try the following

<ol>
<li>Blah blah</li>
<li>&nbsp;
<ol style="position: relative; top: -1em">
<li>Blah blah</li>
<li>Blah blah</li>
<li>Blah blah</li>
</ol></li>
</ol>

brett
03-14-2003, 06:44 AM
Thanks a lot to all of you for replying and the winner is the margin-top -1em solution!!
Thanks