谁能帮帮我,这让我发疯。我在这个网站上看到了其他问题的答案,但我似乎无法应用它们。
基本上,我试图在 html Dreamweaver 中修复表格的宽度。然而,它似乎不起作用。
我当前的代码如下所示:
table align="center" style='table-layout:fixed' width="910" height="627" border="0"
但它仍然扩展到指定的宽度之上。
我也试过这样做:
.fixed { table-layout: fixed; }
<td width="18" class="fixed"></td>
但这也不管用!
最佳答案
您可以尝试将所有需要的样式放在一个类中,
.fixed { table-layout: fixed; width: 910px; height: 627px; border: none; text-align: center;}
然后将类应用到表中:
<table class="fixed">
此外,您能否阐明表格中“尝试固定宽度”的含义?您能否围绕表格或整个表格本身发布更多代码?
关于html - 固定表格布局的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11104327/