设置的div块无法显示

<!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=utf-8" />
<title>大庆师范学院</title>
<style type="text/css">
body{margin:0; padding:0}
#top{width:auto; height:110px;  background:#777777;}
#main{ width:1010px; height:auto; margin:0 auto; background:#AAAAAA;}
#left{width:750px; height:600px; float:left; background:#33FF99;}
#sub_u{width:750;}
#sub_d{}
#right{ width:260px; height:600px; float:right; background:#00FF00;}
#foot{
 width:1010px;
 height:70px;
 background:#555;
 margin:0 auto;
}
</style>
</head>
<body>
<body>
<div id="top" ></div>
<div id="main">
  <div id="left">
   <div id="sub_u"></div>
    <div id="sub_d"></div>
  </div>
  <div id="right"></div>
</div> 
<div id="foot"></div> 
</body>
</html>


上边为代码,设置的ID为“foot”的块状元素无法显示怎么改????

落子鸢
浏览 1902回答 3
3回答

侠客岛的含笑

你的这个问题是foot margin:0 auto;上下外边距为0,左右自动居中,所以他就剧终了,但是你的main 的也是居中,所以就被覆盖了,你把margin改一下,或者用刚才那个同学的建议

我很不愉快

#foot{ clear:both; width:1010px; height:70px; background:#555; margin:0 auto;}
打开App,查看更多内容
随时随地看视频慕课网APP