Php 表不包括';I don’我没有在IE中出现
我有一个带有css和php的html页面。然而,这个表格在IE中并不正确,但在Firefox和Google chrome中却正确 表格显示在IE中 如果我尝试更改表格的css并打开表格,它将在Firefox和chrome中消失 代码如下:Php 表不包括';I don’我没有在IE中出现,php,html,css,Php,Html,Css,我有一个带有css和php的html页面。然而,这个表格在IE中并不正确,但在Firefox和Google chrome中却正确 表格显示在IE中 如果我尝试更改表格的css并打开表格,它将在Firefox和chrome中消失 代码如下: <html> <body> <style type="text/css"> .top { position:absolute; left:0; right:0; height: 92px; } .
<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>
.顶{
位置:绝对位置;
左:0;右:0;
高度:92px;
}
.左{
位置:绝对位置;
左:0;顶部:92px;底部:0;
宽度:178px;
}
.主菜单{
位置:绝对位置;
左边距:20px;
字体大小:20px;
利润上限:200px;
}
.adduser{
位置:绝对位置;
左边距:20px;
字体大小:20px;
边缘顶部:250px;
}
.注销{
位置:绝对位置;
左边距:20px;
字体大小:20px;
边缘顶部:300px;
}
管理员{
位置:绝对位置;
左边距:20px;
字体大小:30px;
边缘顶部:20px;
}
.top{背景:#4169E1;}
.左{背景:#4169E1;}
顶部
左边
欢迎来到管理页面
名称
用户名
远程ip
登录
编辑
更改密码
删除
用户帐户
这不是有效的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>
名称
用户名
远程ip
登录
编辑
更改密码
删除
用户帐户
元素不能包含内容,它表示换行符
不在
或
中。请尝试对HTML验证程序运行您的输出,您会找到您的答案。@不存在:请不要对技术名称和产品名称使用预格式化样式(或反勾号)。这实际上只适用于代码和控制台输入/输出-像CSS和Firefox这样的词都很好(当然,适当大写)。顺便说一句,这些编辑。请帮助我修复代码。如果你不介意的话。我在这里病了一段时间。@user3818265:你能指出你到底在坚持什么吗?看来这个答案会解决你的问题。