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条)

报告相同问题?

悬赏问题

  • ¥15 phython读取excel表格报错 ^7个 SyntaxError: invalid syntax 语句报错
  • ¥20 @microsoft/fetch-event-source 流式响应问题
  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?