Skip to content

Instantly share code, notes, and snippets.

@chrisEff
Last active February 8, 2021 09:17
Show Gist options
  • Select an option

  • Save chrisEff/6b0d5495dfedbf90fc7dde816ddc07c0 to your computer and use it in GitHub Desktop.

Select an option

Save chrisEff/6b0d5495dfedbf90fc7dde816ddc07c0 to your computer and use it in GitHub Desktop.
Numbering table rows via CSS
table {
counter-reset: rowNumber;
}
table tr td:first-child {
counter-increment: rowNumber;
}
table tr td:first-child::before {
content: counter(rowNumber);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment