code_junkie

Does “display: marker” work in any current browsers, and if so, how?

Nov 10th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <ol>
  2. <li>The<li>
  3. <li>quick</li>
  4. <li>brown</li>
  5. </ol>
  6. <ol>
  7. <li>fox</li>
  8. <li>jumped</li>
  9. <li>over</li>
  10. </ol>
  11.  
  12. html { counter-reset: myCounter; }
  13. li { counter-increment: myCounter; }
  14. li:before { content: counter(myCounter)". "; display: marker; width: 5em; text-align: right; marker-offset: 1em; }
  15.  
  16. li:before
  17. {
  18. content: counter(myCounter)". ";
  19. display: inline-block;
  20. width: 2em;
  21. padding-right: 0.3em;
  22. text-align: right;
  23. }
Add Comment
Please, Sign In to add comment