Bug with Broken Ordered list in IE9 June 11, 2011

Recently I’ve been working with ordered lists. And found strange behavior in IE9 when one ordered list is hiding and new one is showing – instead of usual order 1,2,3.. it showed all zeros. And it actually doesn’t matter what list style type you choose – decimal, lower alpha or other.

Let me show you an example in case you do not have the same problem as well on your project:

One Two

  1. one
  2. two

If you open this HTML in IE9 and then click at first on “Two” link and then “One” you will see the issue:

Looks like order breaks in IE9 when one order is hidding then appears new one and then previous one is showing again. To quickly fix you need to place empty element say <div> in the end of the body and when you show ordered list just assing space to this element inner html. Here you are previous html page fixed:

One Two

  1. one
  2. two

It’s important to place empty <div> after ordered lists. If you place it before – it won’t work.

Victoria July 8th, 2011

Seriously, you deserve a monument for this. I have just ran into this bug full stop, and I needed a quick fix. This is just WOW.

Loren Helgeson August 24th, 2011

Seriously? I can’t wait for the day when enough people come around to realizing Internet Explorer is no longer worth the effort.

Kudos on your discovery. This was driving me nuts.

web_dev89 November 24th, 2011

Wow! This works. amazing!

I was stuck with IE9 numbering list and wasted my time in trying so many ways to fix and by chance I came across this blog.
Gave a try and it really worked. I was surprised!
You deserve a lot.

Thank you so much. :)

Vishal shetty February 2nd, 2012

great hack man…..ie sucks and you rock! thanks it helped me too…

Sergey February 13th, 2012

WOW! You saved a lot of my time! Thanks!

pavithra August 23rd, 2012

hi Alexander Kleshchevnikov,

i tried code as ur mentioned.i am unable to reproduce the problem.the hyperlink doesnt work.i was facing same issue.please response as early as possible.

klalex August 23rd, 2012


Do you have Javascript enabled in your browser? Is there any Javascript errors in console? Javascript code in this example is quite strait-forward. Not sure why you have problems.

seo November 3rd, 2013

I need to to thank you for this fantastic read!!
I certainly enjoyed every bit of it. I’ve got you bookmarked to
look at new stuff you post…

Steve January 16th, 2014

I found that an empty HTML comment works as well.

Leave a Reply