Ordered list rendering with width on LIs

It seems that if I attempt to specify the width of a list item tag (<li>) using either a CSS class or a STYLE attribute, IE does not increment the number in front of list each item. i.e. instead of a list with items numbering 1, 2, 3, and 4, I get a 4 item list numbering 1, 1, 1, and 1.

(ppknote: This bug is very similar, but not identical, to width on ol/ul.)

Test page Workaround is not included
Reported by: Kris Oye.

Explorer 5-6 Windows | Reported on 8 July 2005.

This site is no longer maintained. I’m sorry, but it’s just too much work for too little return. You can continue to browse old bug reports, though.

Search reports by browser:

Atom RSS


(Add your own)

1 Posted by Koen on 8 July 2005 | Permalink

I believe this bug is fixed by htc file on this site: http://dexus.nl/tips/ol/

You can apply the htc file like this:

ol {
behaviour: url("ol.htc");

2 Posted by Tim Gross on 11 July 2005 | Permalink

this is also an issue if you set a height on the LI as well.

3 Posted by Chris Hester on 13 July 2005 | Permalink

Anne van Kesteren is battling with lists and IE's mysterious "layout" property in a related post, which has some interesting comments about this issue:


4 Posted by dexus on 27 October 2005 | Permalink

The test page will work correct when you put IE in strict mode.

5 Posted by Paul Davey on 13 January 2006 | Permalink

"The test page will work correct when you put IE in strict mode."

That is only because IE correctly ignores the invalid (unitless) width CSS specifications. And hence it is happy because the LI's are left full-width.

6 Posted by GĂ©rard Talbot on 7 February 2006 | Permalink

The bug still exists in IE 7 beta 2. I still see 4 item list numbering 1, 1, 1, and 1, then a, a, a and a and i, i, i and i.

7 Posted by Nicholas Dykzeul on 25 November 2006 | Permalink

I was able to fix this problem with a simple display:list-item


li { display:list-item; }

That should do the trick.

8 Posted by Paul Koppen on 7 October 2007 | Permalink

I just stumbled upon this bug, and I am not sure if it is already known, but at least I couldn't find it on this page. So:

IE7 ignores horizontal margin on the first list item (only the first) if the ul has a vertical padding and the li has a height.