I want this HTML:
<ol style="list-style:decimal;">
<li>Apples</li>
<li>Oranges</li>
</ol>
to render like this:
Q1. Apples
Q2. Oranges
Ie, I want to prefix "Q" to each number.
I've tried CSS like this:
ol li::before {
content: "Q";
}
but that renders like this:
1. QApples
2. QOranges
I've also tried using list-style: numbered inside;
, but that just shifts the list to the right with the same results. I can't find any way to reference the numbers in order to style them with CSS. This seems like such a simple, common scenario, yet I can't find any way to accomplish it with straightforward CSS (without CSS counters, JavaScript, etc).