感谢任何帮助的CSS/HTML初学者:我有一个表,为它设置了以下CSS属性:
.t5
{
width: 1000px;
column-width: 300px;
column-width: 175px;
column-width: 110px;
column-width: 110px;
column-width: 210px;
column-width: 90px;
} 只要我没有在html中输入任何特定的"display“属性,它就能很好地工作。一旦我选择“显示:块”、“显示:表”、“显示:表行”或甚至“显示:初始化”,输出就会完全忽略我的列宽设置,并将它们最小化到每个单元格中文本的长度。
<table class="t5";>
<tr id="country1row1" style="display:block";>
<td colspan="2">Product A</td>
<td>Quantity Offered:</td>
<td> <input id="volume1" type="text" value="0" </td>
<td>Sales Price Requested (in EURO):</td>
<td> <input id="price1" type="text" value="0.00" </td>
</tr>
</table>发布于 2014-10-17 11:44:46
您是否使用开发人员工具检查您的样式,例如按下f12中的chrome,并查看css对您的样式有什么影响?
在这样的样式设计时,您也可以尝试更具体一些。
<td style="width:100px">sample 1</td> <td style="width:200px">sample 2</td>
https://stackoverflow.com/questions/26424144
复制相似问题