Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project










PROPERTY: counter-reset

counter-reset : none | identifier number
 
Compatibility: Currently not supported by any browser
Version: Level 2
Inherited: No
 
The counter-reset property is a blank space delimited list of one or more identifier/number pairs associated with a selector. The pair sets the numeric value that the named counter will be reset to when the specified selector is encountered. The number part of the pair is optional and the default is zero.
 
For example, you could consecutively number nesting paragraphs, sub-sections of a text, and images in a chapter as 1.0, 1.1, 1.2, etc.
 
If the display property is set to none, then you cannot reset. If the visibility property is set to hidden, then you can reset.
 
You can use the content property to insert counters either before or after a specified element.
 
none
 
The none value prevents the counter from resetting.
 
identifier number
 
The identifier value part of the pair is mandatory and identifies the counter. It can refer to a class, id, or selector. The optional number value is the numeric value to reset to. It can be zero or any positive or negative integer. If omitted, the default is zero.
 
This code from W3C numbers paragraphs as 1, 1.1, 1.1.1, etc.
 
Code:
ol { counter-reset: item }
li { display: block }
li:before { content: counters(item, "."); counter-increment: item }


 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information