I'd like to create an "inline" list format. For example, for writing a paragraph that says
"We can (i) do something, (ii) do something else, or (iii) do nothing."
Where the HTML code would be:
Right now I'm using the following CSS:
The problem is that the "ol" tag seems to create a line break even when the "display: inline" is used. I could probably hack it to use span and p tags, but I really like the idea that one could change the list back and forth.
Perhaps the problem is that you're not allowed to nest a list within a paragraph?
Any thoughts on how to accomplish such an inline list?
"We can (i) do something, (ii) do something else, or (iii) do nothing."
Where the HTML code would be:
<p>We can <ol class="inline"><li> do something, <li> something else, or <li> do nothing.</ol></p>
Right now I'm using the following CSS:
ol.inline {
display: inline;
margin-left: 0;
counter-reset: list-item
}
ol.inline li { display: inline; }
ol.inline li::before {
content: "(" counter(list-item, lower-roman) ")";
}
li { counter-increment: list-item;}
The problem is that the "ol" tag seems to create a line break even when the "display: inline" is used. I could probably hack it to use span and p tags, but I really like the idea that one could change the list back and forth.
Perhaps the problem is that you're not allowed to nest a list within a paragraph?
Any thoughts on how to accomplish such an inline list?