0

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.

http://jsfiddle.net/waZRR/

UPDATE: Actual Live Version

My link

4

3 回答 3

2

添加此样式规则,

.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;
}
于 2012-06-14T19:52:43.813 回答
1

你的运球示例通过放置

 table tr td:first-child { text-align: center !important; } 

http://jsfiddle.net/waZRR/4/

更新

Vega 的解决方案显然更好!别理我^^

更新 2

按照 Vaga 的建议使用 css,并添加新的填充规则。像这样:

 .table thead th:first-child,
 .table tbody td:first-child { text-align: center; padding:4px 0px; }

然后看起来不错:)

于 2012-06-14T19:55:57.490 回答
1

表头上的填充大于单元格上的填充。您将需要修改其上的填充以使您的th复选框与您的其他复选框对齐,td如下所示:

.table thead th {
  padding:7px;
}

更新小提琴:http: //jsfiddle.net/waZRR/1/

于 2012-06-14T19:51:24.710 回答