I've been working on doing some Sharepoint customisations for work, and I was trying to fix the nested OL numbering, when I came across this strange problem.
When you have multiple OL's on a page, and use the generally accepted solution for nested numbering (See: Html ordered list 1.1, 1.2 (Nested counters and scope) not working), the numbering continues on from the previous OL when the second OL is within a div tag.
<html>
<head>
<style>
ol { counter-reset: item; }
ol > li{ display: block; counter-increment: item; }
ol > li:before { content: counters(item, ".") " "; }
</style>
</head>
<body>
<ol>
<li>One</li>
<li>Two
<ol>
<li>Two One</li>
<li>Two Two</li>
<li>Two Three</li>
</ol>
</li>
<li>Three</li>
<li>Four</li>
</ol>
<div>
<ol>
<li>One</li>
<li>Two
<ol>
<li>Two One</li>
<li>Two Two</li>
<li>Two Three</li>
</ol>
</li>
<li>Three</li>
<li>Four</li>
</ol>
</div>
</body>
See http://jsfiddle.net/C5Cjp/ for an example.
I'm new to counters, so I'm curious to know why this functionality is working as it does in the example, and if there's an easy way to fix it so that the second unrelated OL's counter resets.