Welcome to WebmasterWorld Guest from 54.204.165.156

Forum Moderators: incrediBILL

Lining up lists

Is there a better way than tables?

   
12:19 pm on Apr 19, 2001 (gmt 0)

10+ Year Member



Sometimes I will code a section of a web page (or a C program or Perl script) the same way over and over, in spite of the fact that there is a much better way to do it, but since I don't know of that way, I don't know to find out how to do it. This comes under that category.

If I have an ordered or unordered list that is centered, the list is going to look skewed, because each item in the list will be centered. The only way that I know how to fix this is to put the whole thing into a table:

<table><tr><td>
<ul>
<li>one thing</li>
<li>another thing</li>
</ul>
</td></tr></table>

This just *feels* kludgey. Is there a better way?

12:30 pm on Apr 19, 2001 (gmt 0)

10+ Year Member



I don't use DIVs but would putting it in a <DIV></div> work, it would be less typing.

Just guessing really :)

1:30 pm on Apr 19, 2001 (gmt 0)

10+ Year Member



Do you mean like this?

<div>
<ul>
<li>one thing</li>
<li>another thing</li>
</ul>
</div>

That doesn't have any effect.

1:52 pm on Apr 19, 2001 (gmt 0)

10+ Year Member



sorry :(
2:04 pm on Apr 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well for what its worth I don't use the <li> thing instead i would just do something like:

• one thing<br>
• another thing<br>
• one more thing

which looks the same but cleaner, as for the indenting or centering simply wrap it in a nice style like:

<p class="listy">
• one thing<br>
• another thing<br>
• one more thing
</p>

where 'listy'" is set up with whatever font and margin you require

2:05 pm on Apr 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<pre> </pre> ?
5:34 pm on Apr 19, 2001 (gmt 0)

10+ Year Member



Would <div align="left"> do what you are lookin' for? Just curious. Seems to work on IE5 & NS4, here.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month