Created
May 24, 2013 19:43
-
-
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.
This file contains hidden or 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
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