【发布时间】:2015-02-12 21:40:50
【问题描述】:
我在无法轻松修改 HTML 的情况下工作,因此我需要一个 CSS 解决方案来解决下面的边距/填充问题。
代码
HTML
<dd id="rr-element">
<label for="rr-1">
<input type="checkbox" value="1" id="rr-1" name="rr[]">
Do you agree to these terms of service? Note that agreeing to these terms of service may allow us unfettered access to your bank account, wordly possessions, and everything else you hold dear in this world.
</label>
</dd>
CSS
dd {
width: 300px;
}
dd label input {
margin-right: 10px;
}
http://jsfiddle.net/T86h8/403/
输出
当前
想要的
有人知道如何使用纯 CSS 解决方案从当前配置转变为所需配置(参见图片)吗?
谢谢大家。
【问题讨论】:
-
我不知道您的布局是否可以接受,但请查看jsfiddle.net/Lp6a4de8
-
很好的解决方案贾斯汀。随意将此迁移到答案。