Created
August 30, 2009 12:34
-
-
Save Anks/177950 to your computer and use it in GitHub Desktop.
CSS for adding header numbering to google documents
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
/** | |
* CSS to add section numbers to top-level headings in | |
* a Google Docs (or any HTML) document. | |
* | |
* See <http://www.w3.org/TR/CSS2/generate.html> for | |
* more details. | |
*/ | |
body { | |
counter-reset: section; | |
} | |
h1:before { | |
counter-reset: subsection; | |
counter-increment: section; | |
content: counter(section) ". "; | |
} | |
h2:before { | |
counter-reset: subsubsection; | |
counter-increment: subsection; | |
content: counter(section) "." counter(subsection) ". "; | |
} | |
h3:before { | |
counter-increment: subsubsection; | |
content: counter(section) "." counter(subsection) "." counter(subsubsection) ". "; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment