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 CorporationReceived on Saturday, 9 September 2006 16:58:20 UTC
This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:18 UTC