这是我的例子: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 ,但这会强制整个跨度换行。
有任何想法吗?