风格复选框在表格中重叠 [英] styled checkboxes overlap in table
本文介绍了风格复选框在表格中重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从这里的另一个问题得到这个片段在stackoverflow:
如果我将这些复选框放在表中,每行一个复选框,它们会因填充的标签。为什么会发生?为什么表格单元格不能改变它们的高度?
我该如何解决它?
另外, 'width:100%'does not for the label解决方案
试试
tr {
display:block;
margin:10px 0px;
}
或者不添加表格样式
label {
display:block;
}
另外,我制作了一个codepen 这里
I got this snippet from another question here on stackoverflow:
If I put these checkboxes in a table, one checkbox per row, they overlap due to the padding of the labels. Why does this happen? Why doesn't the table cells change their height?
And how can I fix it?
Also, 'width: 100%' does not work for the label
解决方案
Try
tr {
display:block;
margin:10px 0px;
}
Or without adding table styles
label{
display: block;
}
Also, I made a codepen here
这篇关于风格复选框在表格中重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文