Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ordered list displaying all <li>s as number 1 in Explorer 7

I've been alerted to a strange problem in IE7 that I can't locate a solution for. I have a standard ordered list formatted properly, with all opening and closing tags intact.

<ol>
   <li>Item 1</li>
   <li>Item 2</li>
   <li>Item 3</li>
   <li>Item 4</li>
</ol>

All browsers display the list properly except Explorer 7 which renders the list as below:

1. Item 1
1. Item 2
1. Item 3
1. Item 4

Has anyone experienced this issue before? Here's a link to the list. Thanks for any suggestions.

like image 616
cercacielo Avatar asked Dec 07 '25 04:12

cercacielo


2 Answers

I had the same issue before. The following fixed my issue.

ol li {
  margin-left: 2em;
  display: list-item;
  list-style: inside decimal-leading-zero;
}
like image 157
Nancy Avatar answered Dec 08 '25 18:12

Nancy


http://thedesignspace.net/MT2archives/000687.html

This happens when a width is added to the "LI" tags in an ordered list. Internet Explorer 7 will not increment the numbers.

like image 26
dting Avatar answered Dec 08 '25 16:12

dting