W3C home > Mailing lists > Public > www-style@w3.org > September 2006

Re: [CSS21] Possible counters() limitation?

From: Anne van Kesteren <annevk@opera.com>
Date: Sun, 10 Sep 2006 10:20:53 +0200
To: www-style@w3.org
Message-ID: <op.tfnlg3d664w2qv@id-c0020.oslo.opera.com>

On Sat, 09 Sep 2006 22:34:50 +0200, Bert Bos <bert@w3.org> wrote:
> The solution with counter() is simple, though:
>
>     body {counter-reset: h1}
>
>     section {counter-increment: h1; counter-reset: h2}
>     section h:before {content: counter(h1) ".\2007  "}
>
>     section section {counter-increment: h2}
>     section section h:before {content: counter(h1) "." counter(h2) " "}
>
> Unless there is a requirement that you didn't mention...

This wouldn't work for the attached document, for one. As in, it doesn't  
work for an arbitrary depth.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Sunday, 10 September 2006 08:21:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:46 GMT