douxin0251 2011-01-10 10:28
浏览 40
已采纳

Dream Weaver表宽度

I developed a simple PHP web page using Dream Weaver CS5 Version 11.0 Build 4964.

My web page consists of a table (TABLE) contains 10 table rows (TR) and each row has only one table cell (TD).

Every Table Cell (TD) has a table inside it which contains different Form Elements like Textboxes, RadioButtons, CheckBoxes and so on divided in the table columns and rows.

The problem I face is that I put every table width using the Width Property or the Style Property or using the CSS Styling Sheet so that I make the 10 tables has the same width (600 pixels for example) and to show them as they are a one table.

My HTML code is like the following:-

<html>

<body>

<table width="600">

<tr>
<td>

<table width="600">
<tr>
<td width="300">
</td>
<td width="300">
</td>
</tr>
</table>

</td>
</tr>

<tr>
<td>

<table width="600">
<tr>
<td width="200">
</td>
<td width="200">
</td>
<td width="200">
</td>
</tr>
</table>

...

</td>
</tr>


</table>

</body>

</html>

When I browsed my php web page using Live View, the width I put did not apply and Dream Weaver extends some tables and increases the width and the tables borders does not match and some tables appear smaller widthes while others has bigger widthes.

I tried to put each table cell width to control that but it did not work too.

For example, if the width I put is 600 it becomes 641 and I tried to change it in Design and Code Views but the problem still appears.

I welcome any hint to solve that annoying problem.

  • 写回答

6条回答 默认 最新

  • dream518518518 2011-01-10 14:53
    关注

    Table cells and columns will always resize to accommodate the largest element in the row/column. As others have suggested, you should reconsider the use of nested tables. However, if you want to control the width of tables, you can do so with the following style rule:

    table {
        width: 600px;
        table-layout: fixed;
    }
    

    This constrains the width of columns to the dimensions set in the first row.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(5条)

报告相同问题?

悬赏问题

  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失
  • ¥60 要数控稳压电源测试数据
  • ¥15 能帮我写下这个编程吗