Created
August 4, 2009 20:24
-
-
Save rassie/161520 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<style type="text/css"> | |
BODY { | |
counter-reset: chapter; /* Create a chapter counter scope */ | |
} | |
H1:before { | |
content: counter(chapter) ". "; | |
counter-increment: chapter; /* Add 1 to chapter */ | |
} | |
H1 { | |
counter-reset: section; /* Set section to 0 */ | |
} | |
H2:before { | |
content: counter(chapter) "." counter(section) " "; | |
counter-increment: section; | |
} | |
</style> | |
<body> | |
<h1>First heading</h1> | |
<h2>Second heading</h1> | |
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment