t1202-counters-00-b.html 1003 Bytes
Newer Older
darin's avatar
darin committed
1 2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
3
 <head>
darin's avatar
darin committed
4 5 6 7
  <title>CSS 2.1 Test Suite: content: counters(c, &quot;.")</title>
  <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content">
  <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter">
  <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles">
8 9
  <style type="text/css">

darin's avatar
darin committed
10 11 12
  body { white-space: nowrap; }


13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
  body, #test { counter-reset: c; }
  p, #test span { counter-increment: c; }
  #test span:before { content: counters(c, "."); }

  </style>
 </head>
 <body>

 <p>The following two lines should look the same:</p>

 <div id="test">
   <span></span>
   <span></span>
   <span></span>
   <span></span>
   <span></span>
   <span></span>
   <span></span>
   <span></span>
   <span></span>
   <span></span>
   <span></span>
   <span></span>
 </div>

 <div>
   1.1
   1.2
   1.3
   1.4
   1.5
   1.6
   1.7
   1.8
   1.9
   1.10
   1.11
   1.12
 </div>

 </body>
</html>