找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 159|回复: 2

小困惑-margin-top为0怎么没效果?

[复制链接]
发表于 2009-5-20 03:28:43 | 显示全部楼层 |阅读模式 IP:江苏南通
小困惑-margin-top为0怎么没效果?
很简单、基本的一个入门例子,不知道出了什么差错,为什么<div  id="hd01">不能到顶,已经设了margin:0px 怎么还有上边距??? 困惑,请朋友们指教。


a.asp:

<!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" lang="gb2312">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=title%></title>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container"><!--页面层容器-->
  <div id="header"><!--页面头部-->
           <div id="hd01">
           </div>
  </div>
  <div id="PageBody"><!--页面主体-->
    <div id="Sidebar"><!--侧边栏-->
    </div>
    <div id="MainBody"><!--主体内容-->
    </div>
  </div>
  <div id="Footer"><!--页面底部-->
  </div>
</div>
</body>
</html>

css.css:

body {font:12px Tahoma;margin:0px;text-align:center;background:#FFF;}

/*页面层容器*/
#container {width:100%}

/*页面头部*/
#header {width:100%;margin:0 auto;height:100px;background:#FFCC99}

/*页面主体*/
#PageBody {width:800px;margin:0 auto;height:400px;background:#CCFF00}

/*页面底部*/
#Footer {width:800px;margin:0 auto;height:50px;background:#00FFFF}

/*Header部包含*/
#hd01 {width:100%;margin:0 auto;height:26px;background:#FBFBFB; border-bottom:1px solid #999999}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 15:28 , Processed in 0.192730 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表