此代码无法识别我输入的 td witdh 值,但我无法区分样式标签中的表格和单元格宽度/高度(因此表格高度仅为 25px),这意味着我知道我做错了什么但似乎无法修复它,任何建议将不胜感激,谢谢
<head>
<style type='text/css'>
table, td;
table
{
width:800px;height:25px;
}
table
{
position: absolute; right: 100px; top: 80px;
}
table
{
border-collapse:collapse;
}
td
{
border-spacing:0px;
}
td
{
border-bottom-style:solid;
border-bottom-width:1px;
border-color:black;
}
td
{
background-color:grey;
color:red;
}
td
{
text-align:center;
}
</style>
</head>";
while($info = mysql_fetch_assoc($sql))
{
echo"
<body>
<table>
<tr>
<td width='20'></td>
<td width='400'>First Name:</td>
<td width='340'>{$info['firstname']}</td>
<td width='40'><a href='changefirstname.php'>edit</a></td>
</tr>
<tr>
<td width='20'><td>Last Name:</td>
<td>{$info['lastname']}</td>
<td><a href='changelastname.php'>edit</td>
</tr>
<tr>
<td width='20'></td>
<td>email:</td>
<td>{$info['email']}</td>
<td><a href='changeemail.php'>edit</td>
</tr>
<tr>
<td width='20><td>password:</td>
<td>********</td>
<td><a href='changepassword.php'>edit</td>
</tr>
</table>
</body>";