Internet Explorer not incrementing number for non-sibling <li> elements
Posted
by biagidp
on Stack Overflow
See other posts from Stack Overflow
or by biagidp
Published on 2010-05-10T18:24:53Z
Indexed on
2010/05/10
18:34 UTC
Read the original article
Hit count: 273
I've got some html that looks like this:
<ol>
<div>
<li>one</li>
</div>
<div>
<li>two</li>
</div>
<div>
<li>three</li>
</div>
</ol>
Which looks like this in Chrome/Firefox: 1. one 2. two 3. three
But looks like this in IE: 1. one 1. two 1. three
If I change the code so that the li element is the parent of the div element instead of the other way around (so that all the li elements are siblings) IE renders it correctly. Anyone know what causes this or if this is the intended working behavior of IE? Furthermore is one way technically more correct than the other?
<div><li></li></div> VS. <li><div></div></li>
Thanks, David
© Stack Overflow or respective owner