0

我怎样才能简单地移动文本,使其不会在<input>字段下方继续,而不<div>对文本进行换行?

在此处输入图像描述

目前,我的 HTML 为:

<div class="answer">
<div class="control-group">
    <label class="radio">
        <input type="radio" id="a_0" name="a" value="86692726-ff5a-4f1f-b2f4-51a98e03eba0">
        Designer Brille Mode – Brille forum på Trendsales</label>
</div>
<div class="control-group">
    <label class="radio">
        <input type="radio" id="a_1" name="a" value="98f07484-5e65-47fc-bb46-b9a59125bdd2">
        Design by Me – unika og hjemmelavede annoncer på Trendsales</label>
</div>
<div class="control-group">
    <label class="radio">
        <input type="radio" id="a_2" name="a" value="248e7343-ddf7-4d61-94fa-e5425fa5f54b">
        Dansk Børne Mode på Trendsales</label>
</div>
</div>

我正在使用Bootstrap CSS Framework ,可以在 JsBin中找到一个Live 示例

4

3 回答 3

1

第一步:不要inputlabel.

第二步:将&的默认值更改为display,设置和。inputlabelblockwidthfloat them

所以 CSS 将类似于:

.answer {width:200px;overflow:hidden;}
input,label {display:block;float:left}
input {clear:left;width:16px;}
label {width:184px;}

演示:http: //jsfiddle.net/6v8Dc/

于 2012-08-20T06:54:24.050 回答
0

&nbsp;而不是常规空间或display: inline-block;

于 2012-08-20T06:46:32.800 回答
0

演示

嗨,现在曾经white-space nowrap像这样

.control-group {
    white-space: nowrap;
}

演示

于 2012-08-20T06:53:41.920 回答