| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1369 人关注过本帖
标题:如何给多个表格规定同一行高,列宽?
只看楼主 加入收藏
qjw9004
Rank: 1
等 级:新手上路
帖 子:89
专家分:0
注 册:2011-1-27
结帖率:47.37%
收藏
已结贴  问题点数:0 回复次数:2 
如何给多个表格规定同一行高,列宽?
我的页面中有两个什么样定义才使得两个表的行高,列宽都一样?谢谢~~
如:当我设置第一个表行高列宽后,第二个表也就跟着改了~~~

<body>
<div class="rightPanel">
            <div class="rightTop" id="rightTop">
                <div class="rightTitle">
                    <table width="800">
                        <tr height="30px">
                            <th width="3%">1</th>
                            <th width="3%">2</th>
                            <th width="3%">3</th>
                        </tr>
                        <tr height="30px">
                            <th width="3%">非固定A</th>
                            <th width="3%">非固定B</th>
                            <th width="3%">非固定C</th>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="rightContent" id="rightContent" onscroll="jscroll()">            
                <table width="800">
                    <tr height="30px">
                      <td width="3%">1</td>
                      <td width="3%">2</td>
                      <td width="3%">3</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                </table>
            </div>
        </div>
</body>
搜索更多相关主题的帖子: class div 如何 class div 如何 class div 如何 
2011-09-18 17:30
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:4 
用css定义呢?
<style type="text/css">
.tableCls
{
   width:800px;
}
.tableCls tr
{
    height:30px;
}
</style>
<body>
<div class="rightPanel">
            <div class="rightTop" id="rightTop">
                <div class="rightTitle">
                    <table class="tableCls">
                        <tr>
                            <th width="3%">1</th>
                            <th width="3%">2</th>
                            <th width="3%">3</th>
                        </tr>
                        <tr>
                            <th width="3%">非固定A</th>
                            <th width="3%">非固定B</th>
                            <th width="3%">非固定C</th>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="rightContent" id="rightContent" onscroll="jscroll()">            
                <table class="tableCls">
                    <tr>
                      <td width="3%">1</td>
                      <td width="3%">2</td>
                      <td width="3%">3</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                </table>
            </div>
        </div>
</body>
2011-09-19 14:31
qjw9004
Rank: 1
等 级:新手上路
帖 子:89
专家分:0
注 册:2011-1-27
收藏
得分:0 
对CSS不什么了解,能否做个最简单的实例呢?
谢谢了!~~
2011-09-20 21:51
快速回复:如何给多个表格规定同一行高,列宽?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013757 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved