I have a list of items where I am trying to put an image next to some text without wrapping to the next line. To better illustrate, I create a simplified version in a fiddle.
<ul>
<li>Test</li>
<li>
<div id="TEST2"><span>Test 2</span></div>
Image
</li>
<li>Test3</li>
</ul>
The question is: How do I get the text "Image" to be on the same line (to the right of) the Test2 div rather than on the next line? "Test" should still be above and "Test3" should still be below.
I've noticed if I place the closing div tag after the text, it accomplishes my goal - but in my actual code the div element is being created dynamically in Javascript, and I'd prefer to place the image in the html portion if it is possible.
Just in case it matters: I'm using Firefox 27.0.1