表格在IE中没有正确显示


Table doesn't appear right in IE

我有一个html页面与css和php。然而,表格没有出现在IE中。但它在火狐和谷歌chrome上似乎是正确的。

表格显示在IE中

如果我尝试改变表格的css并将表格带上来,它将在Firefox和chrome中消失。

下面是代码:
<html>
<body>
<style type="text/css">
.top {
    position:absolute;
    left:0; right:0;
    height: 92px;
}
.left {
    position:absolute;
    left:0; top:92px; bottom: 0;
    width: 178px;
}
.mainmenu {
    position:absolute;
    margin-left: 20px;
    font-size: 20px;
     margin-top: 200px;
}

.adduser {
    position:absolute;
    margin-left: 20px;
    font-size: 20px;
    margin-top: 250px;
}
.logout {
    position:absolute;
    margin-left: 20px;
    font-size: 20px;
    margin-top: 300px;
}
.admin {
    position:absolute;
    margin-left: 20px;
    font-size: 30px;
    margin-top: 20px;
}

.top { background: #4169E1; }
.left { background: #4169E1; }
</style>
<div class="top">
TOP
</div>
<div class="left">
LEFT
</div>
<div class="mainmenu">
<a  style='text-decoration:none;'   href= "index.html"><font color="white"> main    menu</font> </a>
</div>
<div class="adduser">
<a  style='text-decoration:none;'   href= "index.html"><font color="white">add  users</font> </a>
</div>
<div class="logout">
<a  style='text-decoration:none;'   href= "index.html"><font color="white">logout</font> </a>
</div>
<div class="admin">
welcome to admin page
</div>
<table  style="margin-top:40px;"   border='1'   align='center'>
<tr>
<br><th>name</th><br/>
<br><th>username</th></br>
<br><th>remote ip</th></br>
<br><th>login</th></br>
<br><th>Edit</th></br>
<br><th>Change Password</th></br>
<br><th>Delete</th></br>
<h4   style="margin-top:-150px;" align='center'> Users Accounts </h4>
</tr>
<?php
$con=mysqli_connect("localhost","sqldata","sqldata","accounts");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM uptable");

while($row = mysqli_fetch_array($result))
{
echo "
            <tr>
                <td>{$row['name']}</td>
                <td>{$row['username']}</td>
                <td>{$row['ip']}</td>
                <td>{$row['login']}</td>
               <td><a href='edit1.php?username={$row['username']}'>Edit</a></td>
               <td><a href='userpwd.php?username={$row['username']}'>Change</a></td>
               <td><a href='delete5.php?username={$row['username']}'>Delete</a></td>
            </tr>";
                 }
mysqli_close($con);
?>
</table>

</body>
</html>

这是无效的HTML:

<table  style="margin-top:40px;"   border='1'   align='center'>
  <tr>
    <br><th>name</th><br/>
    <br><th>username</th></br>
    <br><th>remote ip</th></br>
    <br><th>login</th></br>
    <br><th>Edit</th></br>
    <br><th>Change Password</th></br>
    <br><th>Delete</th></br>
    <h4   style="margin-top:-150px;" align='center'> Users Accounts </h4>
  </tr>

<br>元素不能有内容,它代表换行符。

<h4>不在<th><td>