A question regarding the vertical position of numbering in an ordered list:
numbers are pushed to the baseline if <li>
elements only contain floated divs. Any way to prevent this? I want the numbers aligning at the top.
Here's the fiddle:
ol {
margin: 0 2em;
list-style: decimal outside;
}
li {
margin-bottom: 0.25em;
border: 1px solid red;
}
li::after {
content: '';
display: table;
clear: both;
}
div {
float: left;
height: 3em;
background: lightgrey;
}
<ol>
<li>
<div>one two</div>
</li>
<li>
<div>one two three four five</div>
</li>
</ol>
Thanks!
EDIT: I can't use css counters because the page shall be converted to pdfs which don't support css counters.