• Resolved bcumberland

    (@bcumberland)


    I have a simple HTML page where I am trying to display multiple span elements on the same line but it doesn’t seem possible for some reason.

    Here is my code.

    <div style=”display:inline-block;”>
    <span style=”white-space:nowrap”>paragraph.</span>
    <span style=”white-space:nowrap”>paragraph.</span>
    <span style=”white-space:nowrap”>paragraph.</span>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Don’t display the span tag as a block element in CSS.

    Thread Starter bcumberland

    (@bcumberland)

    Answer was to put all the span tags on the same line. WordPress will automatically add a line break if you put them on separate lines.

    <span style=”white-space:nowrap”>paragraph.</span><span style=”white-space:nowrap”>paragraph.</span><span style=”white-space:nowrap”>paragraph.</span>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to stop line break after span element?’ is closed to new replies.