Sample Markup and CSS如何防止复选框/单选按钮下的长文本标签包装?
.wrap {
width: 220px;
}
.indi-wrap {
padding-bottom: 10px;
}
.control-label {
display: inline;
font-weight: 300;
}
button.btn-link {
background: 0;
border: 0;
padding: 0;
margin: 0;
}
<div class="wrap">
<div class="indi-wrap">
<input type="checkbox" />
<label class="control-label">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna.</label>
<button type="button" class="btn btn-link">only</button>
</div>
<div class="indi-wrap">
<input type="checkbox" />
<label class="control-label">Xonsectetur adipiscing.</label>
<button type="button" class="btn btn-link">only</button>
</div>
<div class="indi-wrap">
<input type="checkbox" />
<label class="control-label">Sed do eiusmod tempor incididunt ut labore.</label>
<button type="button" class="btn btn-link">only</button>
</div>
</div>
注: 我知道我可以只是包装标签内的复选框来修复,但是从“INDI-包装”类中的填充它的自动启动父母“换行”为此,我无法编辑“换行”内的任何内容。
有什么办法可以将文本标签的第二行对齐到第一行吗?防止它包装在复选框下。
嘘什么?你的代码在哪里?第二行是什么? –
编辑,所以很抱歉,我在这里是新的 –
相关:http://stackoverflow.com/questions/7076890/indenting-multiline-labels –