Skip to content

Instantly share code, notes, and snippets.

@kovtunos
Last active October 9, 2017 17:48
Show Gist options
  • Save kovtunos/dd8c0e9607d0ad1fce94f497fc314408 to your computer and use it in GitHub Desktop.
Save kovtunos/dd8c0e9607d0ad1fce94f497fc314408 to your computer and use it in GitHub Desktop.
Ordered lists with counter numeration like 1.1.1, 1.1.2 #css
ol {
list-style-type: none;
counter-reset: item;
margin: 0 0 15px;
padding: 0;
}
ol > li {
display: table;
counter-increment: item;
margin-bottom: 0.6em;
}
ol > li::before {
content: counters(item, '.') '. ';
display: table-cell;
padding-right: 0.6em;
}
li ol > li {
margin: 0;
}
li ol > li::before {
content: counters(item, '.') ' ';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment