0

My tables stack on top of each other fine unless they get 100 or so rows, in which case they align side by side on IE 10. I need them to always stack. They're fine or Firefox and on some installations of IE 10. How to I make them always stack regardless of the browser?

<html>
<head>
    <title>Test Project 1</title>
</head>
<body>
    <h2 style="text-align: center;">
        Test Project 1</h2>
    <h3 style="text-align: center;">
        2013-06-09 10:08</h3>
    <table float="left" clear="left" align="left" border="0" cellpadding="1" cellspacing="1" width="728" style="font-family:arial,helvetica,sans-serif;font-size: 12px;">
        <tbody>
            <tr>
                <th scope="col">
                    RFI
                    <hr />
                </th>
                <th scope="col">
                    Description
                    <hr />
                </th>
                <th scope="col">
                    Rec&#39;d
                    <hr />
                </th>
                <th scope="col">
                    Due
                    <hr />
                </th>
                <th scope="col">
                    Issued
                    <hr />
                </th>
                <th scope="col">
                    Age
                    <hr />
                </th>
            </tr>
        </tbody>
    </table>
    <p>
        &nbsp;</p>
    <table float="left" clear="left" align="left" border="0" cellpadding="1" cellspacing="1" width="728" style="font-family:arial,helvetica,sans-serif;font-size: 12px;">
        <tbody>
            <tr>
                <th scope="col">
                    CCO
                    <hr />
                </th>
                <th scope="col">
                    Description
                    <hr />
                </th>
                <th scope="col">
                    Rec&#39;d
                    <hr />
                </th>
                <th scope="col">
                    Due
                    <hr />
                </th>
                <th scope="col">
                    Issued
                    <hr />
                </th>
                <th scope="col">
                    Age
                    <hr />
                </th>
            </tr>
        </tbody>
    </table>
</body>
</html>
4

4 回答 4

0

您可以尝试添加表格而不是表格之间的那个空段落

<br style="clear:both"/>
于 2013-06-09T17:16:33.780 回答
0

当您使用浮动属性时。您需要将下一个元素换成新行,使用:

table {clear: both;}

或在表格之间放置<br/>标签。

于 2013-06-09T17:18:48.620 回答
0

只需删除标签上的float="left" clear="left"属性就可以了。甚至不是表格的有效属性。tablefloatclear

于 2013-06-09T17:19:49.760 回答
0

在一个表中添加两个表

喜欢

      <Table id="main">

   <tr>
    <td>
      <Table id=1> </table>
   </td>
   <td> 
     <Table id=2> </table>
   </td>
     </tr>
   </table>
于 2013-06-09T17:20:07.970 回答