为什么层buttom 不在底部显示,而在层top附近。

dafuw 2009-11-20 02:28:56

<!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>
<title></title>
<style type="text/css">
body
{
font-family: Verdana;
font-size: 14px;
margin: 0;
}
#content
{
width: 968px;
margin: auto;
}
#left
{
width: 165px;
float: left;
height: 378px;
margin-top: 10px;
margin-right: 10px;
}
#right
{
width: 750px;
float: right;
margin-top: 10px;
}
#mainbody
{
margin-top: 10px;
height: auto;
}
#buttom
{
text-align: center;
vertical-align: bottom;
}
</style>
</head>
<body>
<div id="content">
<div id="top">
<img src="images/hometop.gif" alt="" />
</div>
<div id="mainbody">
<hr />
<div id="left">
<img src="images/newpic/leftBg2.gif" alt="" />
</div>
<div id="right">
<label runat="server" id="lbl1">
</label>
</div>
</div>
<div id="buttom">
版权所有©
</div>
</div>
</body>
</html>

...全文
98 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
caibo289534976 2009-11-20
  • 打赏
  • 举报
回复
你没有清除浮动;clear:both
#buttom
{
text-align: center;
vertical-align: bottom;
clear:both;
}
记得给我散分

61,124

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧