【发布时间】:2013-11-02 23:59:16
【问题描述】:
这是我的例子:http://jsfiddle.net/SfTuD/1/
HTML:
<label class="longLabel">Create Document</label>
<input class="radioButton" checked="checked" value="true" id="Yes" type="radio"></input>
Allowed
<input class="radioButton" value="false" id="No" type="radio"></input>
Not Allowed
<span class="description">A user with this permission will be allowed to create new Documents, Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</span>
CSS:
label {
min-width:165px;
}
label.longLabel {
width:165px;
}
input.radioButton {
margin-right:5px;
}
.description {
font-style: italic;
padding-left: 20px;
}
我希望描述范围保持在单选按钮的右侧。也就是说,描述的新行应该与“A user...”对齐
我尝试过 display: inline-block,但这会强制整个跨度换行。
有什么想法吗?
【问题讨论】:
-
只是一个建议:用
li元素、float或inline-blocklis 中的标签包装输入。 -
在 (X)HTML 中没有
</input>这样的东西 -
在 FF 24 中看起来不错。您在哪个浏览器中看到问题?