Skip to content

Instantly share code, notes, and snippets.

@trumball
Created May 24, 2013 19:43
Show Gist options
  • Save trumball/5646023 to your computer and use it in GitHub Desktop.
Save trumball/5646023 to your computer and use it in GitHub Desktop.
Continued List Ordering I feel this may not be an extremely popular snippet, but it does have its market among developers. There may be situations where you’ll need to continue a list of items but split into two separate UL elements. Check out the code above for an awesome CSS-only fix.
ol.chapters {
list-style: none;
margin-left: 0;
}
ol.chapters > li:before {
content: counter(chapter) ". ";
counter-increment: chapter;
font-weight: bold;
float: left;
width: 40px;
}
ol.chapters li {
clear: left;
}
ol.start {
counter-reset: chapter;
}
ol.continue {
counter-reset: chapter 11;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment