Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save omurphy27/3518a4a6f2582f6264c2 to your computer and use it in GitHub Desktop.
Save omurphy27/3518a4a6f2582f6264c2 to your computer and use it in GitHub Desktop.
Custom OL ordered list CSS with number counter.css
/*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