【发布时间】:2014-04-25 05:51:26
【问题描述】:
我有一张非常大的桌子,我需要将其包含在原型中。如何更改列宽?我使用 CSS 的尝试没有成功。
http://jsbin.com/lebokewi/1/edit?html,css,output
CSS
table, th, tr, td {
border: 1px solid #000;
}
#colHdr th:nth-of-type(1) {width: 100px;}
#colHdr th:nth-of-type(2) {width: 50px;}
#colHdr th:nth-of-type(3) {width: 200px;}
#colHdr th:nth-of-type(4) {width: 60px;}
#colHdr th:nth-of-type(5) {width: 80px;}
【问题讨论】:
-
你试过了吗:column-width:100px; -moz 列宽:100 像素; /* Firefox / -webkit-column-width:100px; / Safari 和 Chrome */ ?
-
谢谢,但我尝试了所有这些,但它们都不起作用。
标签: javascript html css html-table