I'm wanting to figure out why the th checkbox never gets aligned with the rest of the column. All checkboxes should be center aligned.
UPDATE: Actual Live Version
I'm wanting to figure out why the th checkbox never gets aligned with the rest of the column. All checkboxes should be center aligned.
UPDATE: Actual Live Version
添加此样式规则,
.table thead th:first-child,
.table tbody td:first-child { text-align: center; }
演示:http: //jsfiddle.net/skram/waZRR/3/
你的现场版本与你在小提琴中的不同。但问题出在下面的风格上myccs.css
,
table .checkbox {
margin: 0 !important;
padding: 8px 13px;
}
尝试添加如下样式,
table .checkbox {
margin: 0 !important;
padding: 8px 0px !important;
}
你的运球示例通过放置
table tr td:first-child { text-align: center !important; }
更新
Vega 的解决方案显然更好!别理我^^
更新 2
按照 Vaga 的建议使用 css,并添加新的填充规则。像这样:
.table thead th:first-child,
.table tbody td:first-child { text-align: center; padding:4px 0px; }
然后看起来不错:)
表头上的填充大于单元格上的填充。您将需要修改其上的填充以使您的th
复选框与您的其他复选框对齐,td
如下所示:
.table thead th {
padding:7px;
}
更新小提琴:http: //jsfiddle.net/waZRR/1/