문제

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