我目前正在为游戏服务器设计一个新的服务器 - 客户端界面,并且偶然发现了一个问题,即我的div
类中的一个对内容没有任何影响。Div对内容没有任何影响
该site is live (http://crysis-or.eu/),和HTML/PHP & CSS可以查看。
<div class="tableenc">
试图影响的具体内容是表格;我正试图将桌子移到左边,但桌子不动。
我已经尝试了一些东西,例如在<body>
之外移动<div class="tableenc">
(并且显然修改了CSS的相关部分),但没有任何结果。
我在做什么错?
问题代码:
PHP/HTML:
<body>
<div class="tableenc">
<table class="login" width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" action="checklogin.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong><font color="#265CFF"><h2>Login to Crysis Wars Server Portal</h2></font></strong></td>
</tr>
<tr>
<td width="78"><font color="#265CFF">Username</font></td>
<td width="6"><font color="#265CFF">:</font></td>
<td width="294"><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td><font color="#265CFF">Password</font></td>
<td><font color="#265CFF">:</font></td>
<td><input name="mypassword" type="text" id="mypassword"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Login"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
</div>
</body>
CSS:
body {
width:100%;
margin-left:-0px;
background:url("../img/pgbg.jpg") repeat-x;
}
body > table {
position:absolute;
}
body > .tableenc {
margin-right:70px;
}
您的HTML完全无效。你不能把'
PHP与此有什么关系? – j08691
@MarcB它还在开发中,我需要首先获得初始样式,然后我会对其进行优化。 – cybermonkey