![]() |
#2
yms1232011-09-19 14:31
用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> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </div> </div> </body> |
我的页面中有两个什么样定义才使得两个表的行高,列宽都一样?谢谢~~
如:当我设置第一个表行高列宽后,第二个表也就跟着改了~~~
<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> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div>
</div>
</body>