菜鸟,求解释!求帮助!

lyz12600 lyz12600 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>首页</title>
<link href="c.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>

<body>
<div id="container">
<div id="header">
<div id="logo">
<img src="../图片/folder_web.png" width="150" height="150"></img>
</div>

<div id="lable">
<span id="c" class="style1">c</span>
<span id="l" class="style1">l</span>
<span id="o" class="style1">o</span>
<span id="u" class="style1">u</span>
<span id="d" class="style1">d</span>
</div>

<div id="simple">
<table>
<tr>
<td width="20%" align="center">用户名</td>
<td align="left"><input type="text" name="username" size="20"></td>
<td width="40%" align="left"><input type="checkbox" name="auto" id="auto_login">
<font class="style2">自动登录</font></td>
</tr>
<tr>
<td width="20%" align="center">密码</td>
<td align="left"><input type="password" name="password" size="20"></td>
<td align="left"><input type="submit" name="submit" value="登录"></td>
</tr>
<tr>
<td></td>
<td align="center"><a href="www.baidu.com"><font class="style2">找回密码</font></a></td>
<td align="left"><a href="www.baidu.com"><font class="style2">注册</font></a></td>
</tr>
</table>
</div>
</div>

<div id="navbar">
</div>

<div id="research">
</div>

<div id="primary">
</div>

<div id="magic">
</div>

<div id="footer">
</div>
</div>
</body>
</html>


下面是css部分:

/* CSS Document */
body{
background-color:#E0EEE0;
}
#container{
width:900px;
height:800px;
margin:0px auto;
background-color:#EBEBEB;
}

#header{
width:100%;
height:150px;
background-color:#CFCFCF;
}

#logo{
width:150px;
height:150px;
float:left;
} <!--标记部分,图片logo-->

#lable{
width:350px;
height:150px;
float:left;
}

.style1{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:100px;
letter-spacing:2px;
}

#c{ color:#0033FF;}
#l{ color:#99CC00;}
#o{ color:#FF9900;}
#u{ color:#CC0000;}
#d{ color:#FF00CC;}
<!--网站名设置-->
#simple{
background-color:#99FF99;
height:150px;
position:absolute;
top:0px;
left:570px;
margin:0px;
}

#navbar{
background-color:#D8BFD8;
width:100%;
height:50px;
}

#research{
background-color:#EEEE00;
width:100%;
height:80px;
}

#primary{
background-color:#BFEFFF;
width:50%;
height:450px;
float:left;
}

#magic{
background:#C6E2FF;
width:50%;
height:450px;
float:right;
}

#footer{
background-color:#9999CC;
width:100%;
height:100px;
clear:both;
}

这个是我暂时分出来的布局,可是我想把登录界面放在右上角,明明放在simple中了,可是为什么总是位置偏移,求指导!
...全文
评论 6
收藏 已收藏
分享
返回顶部
lyz12600
CSS 61,116 成员 60,701 内容