3

In jquery mobile the checkbox has a label caption and if the text is long, jqm wrap it in multiline, I need to do like the second checkbox without space. eg.

<label style="white-space: nowrap;">

http://jsfiddle.net/evilripper/4rWMe/1/ :)

I tryed to set nowrap in the style of the label but doesn't works.

4

1 回答 1

3

Put text in a span:

<label>
    <input name="checkbox-0" type="checkbox" />
    <span style="white-space: nowrap;">Very long text with space Very long text with space Very long text with
     space</span>
 </label>

DEMO: http://jsfiddle.net/4rWMe/2/

于 2013-03-14T10:01:47.710 回答