ublec
ublec

Reputation: 172

Multiples text tags without new line

Note: Please don't mark this as duplicate. There are similar questions, but they don't answer my question.

Is there any way to display multiple <p> or <div> tags without a line break/new line? I've tested around with all the nesting you could think of. Maybe it's impossible?

Here's an example:

<pre>Can multiple tags </pre>
<pre>be merged into a single</pre>
<pre> line?</pre>
<br>
<p>I want the text to all be in one line like this</p>

I want the result to be: "Can multiple tags be merged into a single line?"

Thank you.

Upvotes: 1

Views: 55

Answers (1)

Green
Green

Reputation: 544

.makeInline {
  display: inline-block;
}
<pre class="makeInline">Can multiple tags</pre>
<pre class="makeInline">be merged into a single</pre>
<pre class="makeInline">line?</pre>

You might have to use display: inline-block; for this.

Upvotes: 2

Related Questions