Re: [CSS21] Possible counters() limitation?

I think the following example is the solution:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title></title>
    <style type="text/css">
div:before { content: counters(item, '.'); counter-increment: item; }
div > *:first-child { counter-reset: item; }
div { margin-left: 20pt; }
    </style>
  </head>
  <body>
    <div>
      Level 1
      <div>Level 1.1</div>
      <div>
        Level 1.2
        <div>Level 1.2.1</div>
        <div>Level 1.2.2</div>
      </div>
      <div>
        Level 1.3
        <div>Level 1.3.1</div>
        <div>
          Level 1.3.2
          <div>Level 1.3.2.1</div>
        </div>
      </div>
    </div>
  </body>
</html>

Werner.
-- 
Werner Donné  --  Re
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803	e-mail: werner.donne@re.be

Received on Monday, 11 September 2006 08:58:38 UTC