Sunday, February 13, 2011

The Power of CSS’s Automatic Numbering

CSS is great for styling your website, but did you know it can do math? Of course it can! When you define an ordered list who do you think keeps track of the numbers? It’s built into CSS!

<ol>
<li>Opening Scene</li>
<li>Boy Meets Girl</li>
<li>Boy Looses Girl</li>
<li>Boy Fights Opponents
<ol>
<li>The Wrestler</li>
<li>The Engineer</li>
<li>Captain Doom</li>
</ol>
</li>
<li>Everybody Lives Happily Ever After</li>
</ol

Article Source: http://kitmacallister.com/2011/02/11/css-automatic-numbering/