Css 设置表格宽度-不受保护
我试图用类选择器为某个表设置一个固定的宽度。 但它完全没有受到影响。这个语法有什么遗漏/错误 cssCss 设置表格宽度-不受保护,css,class,html-table,Css,Class,Html Table,我试图用类选择器为某个表设置一个固定的宽度。 但它完全没有受到影响。这个语法有什么遗漏/错误 css .delivoptions_table th { table-layout:fixed; overflow: hidden; width: 200px; } 表格.. <div class = "delivoptions_table"> <table id="deliver_alt_table"> <tr>
.delivoptions_table th {
table-layout:fixed;
overflow: hidden;
width: 200px;
}
表格..
<div class = "delivoptions_table">
<table id="deliver_alt_table">
<tr>
<td> ... </td>
</tr>
...
</table>
</div>
...
...
您的CSS选择器针对的是.deliveOptions\u表中的所有元素,但您的CSS选择器中没有任何
元素。更新选择器,使其指向
本身:
.delivoptions_table table {
table-layout:fixed;
overflow: hidden;
width: 200px;
}
您的CSS选择器针对的是.deliveOptions\u表中的所有
元素,但其中没有任何
元素。更新选择器,使其指向
本身:
.delivoptions_table table {
table-layout:fixed;
overflow: hidden;
width: 200px;
}