Search code examples
htmlcssword-wrap

How to not break line on before "?"?


I am French. In French there must be a space before and after a question mark "?". However, depending on the size of the screen, sometime the "?" is online on the next line. How to prevent this ugly display?

I cannot put a tag inside the question because they are binded.

<div class="row">
    <div class="col-md-8 col-md-offset-2">
        <div class="errorbox text-left">
            <p></p>
            <ul>
                <li>Question 1 ? </li>
                <li>Question 2 ? </li>
                <li>Question 3 ? </li>
            </ul>
        </div>
    </div>
</div>

Thanks,

Stéphane.


Solution

  • use &nbsp; or try to use css white-space: nowrap;

    <li>Question&nbsp;1&nbsp;? </li>
    <li>Question&nbsp;2&nbsp;? </li>
    <li>Question&nbsp;3&nbsp;? </li>