- From: L. David Baron <dbaron@dbaron.org>
- Date: Sat, 9 Sep 2006 09:58:09 -0700
- To: www-style@w3.org
Received on Saturday, 9 September 2006 16:58:20 UTC
On Saturday 2006-09-09 16:51 +0000, Simon Pieters wrote: > You're right. Here's a second shot: > > :root, h ~ section:first-of-type { counter-reset:headers; } > h::before { content:counters(headers, "."); counter-increment:headers; } That won't work if some sections are nested within divs, e.g.: <section> <h>should be 1</h> <div> <section> <h>should be 1.1</h> </section> </div> <section> <h>should be 1.2</h> </section> </section> -David -- L. David Baron <URL: http://dbaron.org/ > Technical Lead, Layout & CSS, Mozilla Corporation
Received on Saturday, 9 September 2006 16:58:20 UTC