Css 表单元格宽度均匀
我继续发展和探索css。 我想把所有的表格单元格都放在相同的宽度上,而不是像JSFIDLE中那样。我试图手动为“th标签”和“td标签”设置宽度,但它们没有给出我定义的宽度Css 表单元格宽度均匀,css,css-tables,Css,Css Tables,我继续发展和探索css。 我想把所有的表格单元格都放在相同的宽度上,而不是像JSFIDLE中那样。我试图手动为“th标签”和“td标签”设置宽度,但它们没有给出我定义的宽度 .tablesorter { margin: -5px 0 0 0; table-layout: fixed; } .tablesorter td{ margin: 0; padding: 0; border-bottom: 1px dotted #ccc; } .tablesorter thea
.tablesorter {
margin: -5px 0 0 0;
table-layout: fixed;
}
.tablesorter td{
margin: 0;
padding: 0;
border-bottom: 1px dotted #ccc;
}
.tablesorter thead tr {
height: 34px;
color:#082B33;;
background:#B5E5EF;
text-align: left;
cursor: pointer;
}
fiddle链接如下所示:
试试这个
.tablesorter{
width:100%;
}
table tr th, table tr td{
width:16.6%;
word-break: break-all;
}
试试这个
.tablesorter{
width:100%;
}
table tr th, table tr td{
width:16.6%;
word-break: break-all;
}
所以“全部打断”会将文本按行打断,对吗?如果我有不同列数的表呢?我必须应用宽度:在tr-th中,不同?那么break all将文本按行打断,对吗?如果我有不同列数的表呢?我必须应用宽度:在tr th中,不同?