I have this webpage. Here is the raw HTML page.
<body>
<p>GBN: <div id="output"></div>KH/s</p>
</body>
My problem is that the words are on different lines. How would I make it so that the worlds 'GBN:', '0' and 'KH/s' appear all on the same line?
I have this webpage. Here is the raw HTML page.
<body>
<p>GBN: <div id="output"></div>KH/s</p>
</body>
My problem is that the words are on different lines. How would I make it so that the worlds 'GBN:', '0' and 'KH/s' appear all on the same line?
Share Improve this question edited Apr 15, 2014 at 18:29 Robert Harvey 181k48 gold badges348 silver badges513 bronze badges asked Apr 15, 2014 at 18:21 user3529680user3529680 133 bronze badges 3- 5 I'm sorry, but I'm not clicking on random links. Put your code here, in your question, otherwise when you solve your problem this entire question bees immediately meaningless and nonsensical to future users. – David Thomas Commented Apr 15, 2014 at 18:27
- 1 Stack Overflow etiquette requires that you include your relevant code here, in the question itself, not in an offsite link. – Robert Harvey Commented Apr 15, 2014 at 18:27
- Sorry, I did not know this. I will keep it in mind for next time. – user3529680 Commented Apr 15, 2014 at 19:32
3 Answers
Reset to default 8Instead of using a <div id="output">
you could use <span id="output">
which is inherently inline.
Alternatively you could style the <div>
with #output { display: inline-block;}
.
Use <span>
instead of <div>
Use a span instead of a div
<body>
<p>GBN: <span id="output"></span>KH/s</p>
</body>