質問

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?

役に立ちましたか?

解決

Instead 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>
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top