I have a div that looks like this:
<div>
That's <div id="output"></div>
</div>
The “output” that is going into the innerHTML of that 2nd div is a single word, such that the contents of the main div looks like one of these, depending on what choices the user has selected elsewhere:
That's right!
That's good.
That's close.
The problem is, my output div is not outputting on the same line. So it looks like this
That's
right!
How can I make the contents of “output” always be on the same line as the other contents of the main div?
div is a block element rather than inline. You want to use a span instead so use