Possible Duplicate:
How to align checkboxes and their labels consistently cross-browsers
我有以下代码:
<div id="form-footer">
<ul>
<li>
<label for="test">Label text</label>
<input type="checkbox" name="" value="" id="test" />
</li>
</ul>
</div>
最佳答案
如果一切都是单行,则可以使用line-height属性:
#form-footer li { height: 30px; line-height: 30px; /** same as height */ }
关于css - 如何对齐复选框和标签标签? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9380411/