Created
October 28, 2014 18:34
-
-
Save omurphy27/3518a4a6f2582f6264c2 to your computer and use it in GitHub Desktop.
Custom OL ordered list CSS with number counter.css
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
/*http://css-tricks.com/numbering-in-style/*/ | |
.interior ol { | |
counter-reset: my-badass-counter; | |
list-style: none; | |
} | |
.interior ol li { | |
position: relative; | |
padding: 0 0 0 10px; | |
} | |
.interior ol li:before { | |
content: counter(my-badass-counter); | |
counter-increment: my-badass-counter; | |
color: #fff; | |
text-align: center; | |
width: 20px; | |
height: 20px; | |
background: #1c3f95; | |
border-radius: 50%; | |
position: absolute; | |
left: -18px; | |
top: 3px; | |
font: 12px/20px 'Droid Sans', Arial, sans-serif; | |
} | |
.interior ol ol li { | |
font: 14px/1.8em "Droid Sans",Arial,sans-serif; | |
} | |
.interior ol ol li:before { | |
content: counter(my-badass-counter, lower-roman); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment