So, in case someone wants to see it in action, I had to reply because I do almost exactly this in one of my HTML5 projects.
The CSStricks link from Psider above is good for the explanation, so I'll just drop this code here for anyone thinking of trying it out. Note that for this, I use <p> tags for my "list items" in the topics, but I think I did that for a weird reason and you could do the same with regular <li> tags.
So lists in my topic look something like this in the HTML. I apply my "bluenumbercircle" class when I want to use this:
Code: Select all
<ol>
<p class="bluenumbercircle>Text here</p>
<p class="bluenumbercircle>Text here</p>
<p class="bluenumbercircle>Text here</p>
<p class="bluenumbercircle>Text here</p>
</ol>
Then this is in my CSS:
Code: Select all
ol
{
counter-reset: forcednumbers;
}
/* This sets the correct spacing so that multiple lines indent correctly and it's properly left aligned. */
ol > p.bluenumbercircle
{
margin-left: -14px;
text-indent: -26px;
margin-bottom: 5px;
}
/* Styles the numbers to a blue circle with white text */
ol > p.bluenumbercircle::before
{
counter-increment: forcednumbers;
content: counter(forcednumbers);
background: #06afce;
border-radius: 50%;
color: #fff;
padding-left: 5px;
padding-right: 5px;
margin-right: 8px;
}
And it looks like this:
blue circle numbers.png
So there you go. I use it in a few topics. But not much. It was indeed one of the trickier (and in the end, least useful really) custom CSS adds I've done. But it was a fun challenge to work out.
You do not have the required permissions to view the files attached to this post.