Below is the HTML code for two ordered list items. I need to insert an element with float: left
into some of these list items. But this shifts the numbering to the right:
.blob {
float: left;
width: 1cm;
height: 5mm;
background-color: #f00;
}
<ol>
<li>Item 1</li>
<li><div class="blob"></div> Item 2</li>
</ol>
How can we avoid that? I prefer solutions without JavaScript.
To be clear: I want the numbers to be below each other and the red box left to the text of the second item.
Update: This issue only appears in Chrome.