Skip to content

Instantly share code, notes, and snippets.

@EkremGungormez
Created February 23, 2012 11:19
Show Gist options
  • Save EkremGungormez/1892430 to your computer and use it in GitHub Desktop.
Save EkremGungormez/1892430 to your computer and use it in GitHub Desktop.
adding text before list en
.MainList{
list-style-type:none; /* delete default counter */
counter-reset:elementcounter; /* create custom counter and set it to 0 */
}
.MainList > li:before{
content: "Element" counter(elementcounter) " - "; /* print out "Element " followed by the current counter value */
counter-increment:elementcounter; /* increment counter */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment