By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,228 Members | 1,375 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,228 IT Pros & Developers. It's quick & easy.

numbered list > 1000

P: n/a
How may I generate a numbered list (using <ol><li>, etc), which contains
more than 1000 elements? My list is ok till 999, then it continues with
000, 001, 002, etc.

Thanks for a tip

Max
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Max Bentz <ma*********@yahoo.de> wrote:
How may I generate a numbered list (using <ol><li>, etc), which
contains more than 1000 elements? My list is ok till 999, then it
continues with 000, 001, 002, etc.


Such a large list is of questionable usefulness on the Web. Would it be
better to make its content available via a query interface, so that the
user can specify the range he wants?

There are problems with large numbers as list item numbers,
irrespective of the number of items. In fact, more than two digits
causes problems in some browsers, and with more than four, most
browsers have problems. There's nothing you can do about this browser
deficiency in HTML, apart from using the obvious workaround of using
a ul list or a table and putting the numbers into the page content,
into the items or cells.

In CSS, you can suggest a fix, e.g.
<ol style="margin-left:4em">
since the problem is really cause by too little horizontal space on the
left of the list items. Browsers probably count correctly, but e.g. the
initial "1" may get dropped out, or become invisible, in item numbers
like "1000". Setting the left margin to 4em should suffice for about
eight digits.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2

P: n/a
Hi ,

thanks a lot, that fixed my problem!!

Yes, I am aware of the questionable usefulness on the Web of such large
liste. The only reason why I need it, is for a php-querry of a
mysql-database (one querry shall show the complete database-list, which
unfortunately is bigger than 1000).

But I am very happy with that workaround, you suggested, it works
perfect with IE and Mozilla, and thats all I need. Thanks again!

Max

On 17.01.2004 20:00 Jukka K. Korpela wrote:
Max Bentz <ma*********@yahoo.de> wrote:
How may I generate a numbered list (using <ol><li>, etc), which
contains more than 1000 elements? My list is ok till 999, then it
continues with 000, 001, 002, etc.


Such a large list is of questionable usefulness on the Web. Would it be
better to make its content available via a query interface, so that the
user can specify the range he wants?

There are problems with large numbers as list item numbers,
irrespective of the number of items. In fact, more than two digits
causes problems in some browsers, and with more than four, most
browsers have problems. There's nothing you can do about this browser
deficiency in HTML, apart from using the obvious workaround of using
a ul list or a table and putting the numbers into the page content,
into the items or cells.

In CSS, you can suggest a fix, e.g.
<ol style="margin-left:4em">
since the problem is really cause by too little horizontal space on the
left of the list items. Browsers probably count correctly, but e.g. the
initial "1" may get dropped out, or become invisible, in item numbers
like "1000". Setting the left margin to 4em should suffice for about
eight digits.

Jul 20 '05 #3

P: n/a
It seems "Max Bentz" wrote in comp.infosystems.www.authoring.html in
article <bu************@ID-111556.news.uni-berlin.de>:
thanks a lot, that fixed my problem!!


What did?

makes it harder to follow discussions.
before the material you're commenting on, it
When you put your comments

http://oakroadsystems.com/genl/unice.htm#upside

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #4

P: n/a
On Sat, 17 Jan 2004 19:00:51 +0000 (UTC), "Jukka K. Korpela"
<jk******@cs.tut.fi> wrote:
There are problems with large numbers as list item numbers,
irrespective of the number of items. In fact, more than two digits
causes problems in some browsers,


Do you happen to know which? I have a list of over 100 items on one of
my pages (for fairly good reasons) and I'd like to know if I'm screwing
anyone up. (If it's WebTV or Netscape 2, I'm not going to worry
overmuch.)

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #5

P: n/a
Stephen Poley <sb******************@xs4all.nl> wrote:
There are problems with large numbers as list item numbers,
irrespective of the number of items. In fact, more than two digits
causes problems in some browsers,


Do you happen to know which? I have a list of over 100 items on one
of my pages (for fairly good reasons) and I'd like to know if I'm
screwing anyone up.


My IE 6 (Win98) cuts off the left part part of first digit if I have
e.g. <li value="200">. If the first digit is "1", it seems to get
displayed OK. But this may depend on the font.

I wouldn't worry much about it, though, since setting margin-left to a
reasonable width will mostly fix it. (I wrote "mostly" since there
might be browsers that have this problem and that let the user switch
off stylesheets.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.