焦点图的时候 设置了隐藏之后就三张图都不见了 我就width: 1000px; margin:0 auto就正常了,可是到下面这个模块的时候 main就直接被焦点图覆盖了 这是怎么回事呢?
<!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>
<link href="css/main.css"rel="stylesheet"type="text/css"/>
<script src="js/setHomeSetFav.js"type="text/javascript"charset="gb2312"></script>
<script src="js/myfocus-2.0.1.min.js"type="text/javascript"></script>
<script src="js/mf-pattern/mF_YSlider.js"type="text/javascript"></script>
<link href="js/mf-pattern/mF_YSlider.css"rel="stylesheet"type="text/css"/>
<script type="text/javascript">
myFocus.set({
id:'picBox'}
)
</script>
</head>
<body>
<div class="top">
<div class="top-content">
<ul>
<li><a href="#">联系我们</a></li>
<li><a href="#"onclick="AddFavorite(window.location,document.title)">加入收藏</a></li>
<li><a href="#"onclick="SetHome(window.location)">设为首页</a></li>
</ul>
</div>
</div><!--top结束-->
<div class="wrap">
<div class="logo">
<div class="logo-left">
<img src="images/logo.jpg"alt="慕课网"/>
</div>
<div class="logo-right">
<img src="images/tel.jpg"alt="服务热线"/>24小时服务热线:<span class="tel">123-456-7890</span>
</div>
</div><!--logo结束-->
<div class="nav">
<div class="nav-left"></div>
<div class="nav-mid">
<div class="nav-mid-left">
<ul>
<li><a href="#">首页</a></li>
<li><a href="list.html">关于慕课</a></li>
<li><a href="list.html">新闻动态</a></li>
<li><a href="list.html">课程中心</a></li>
<li><a href="list.html">在线课程</a></li>
<li><a href="list.html">人才招聘</a></li>
</ul>
</div>
<div class="nav-mid-right">
<form action=""method="post">
<input type="text"class="search-text"/>
</form>
</div>
</div><!--nav-mid结束-->
<div class="nav-right"></div>
</div><!--nav结束-->
<div class="ad"id="picBox">
<div class="loading"><img src="images/loading.gif"alt="图片加载中" /> </div>
<div class="pic">
<ul>
<li><img src="images/ad2.jpg"/></li>
<li><img src="images/ad3.jpg"/></li>
<li><img src="images/ad4.jpg"/></li>
</ul>
</div><!--ad结束-->
<div class="main">
<div class="news"></div><!--news结束-->
<div class="course"></div><!--course结束-->
<div class="sidebar"></div><!--sidebar结束-->
</div><!--main结束-->
</div><!--wrap结束-->
</body>
</html>
@charset "utf-8";
/* CSS Document */
*
{
margin:0;
padding:0;
font-size:12px;
}
body
{
background-color:#f5f5f5;
}
.top
{
width:100%;
height:27px;
background:url(../images/top_bg.jpg)repeat-x;
}
.top-content
{
width:1000px;
margin:0 auto;
}
.top-content li
{
list-style-image:url(../images/li_bg.gif);
float:right;
width:70px;
line-height:27px;
}
.top-content a:link,.top-content a:visited
{
color:#8E8E8E;
text-decoration:none;
}
.top-content a:hover,.top-content a:active
{
color:#900;
text-decoration:none;
}
.wrap
{
width:1000px;
margin:0 auto;
}
.logo
{
height:80px;
background-color:#FFF;
}
.logo-left
{
width:200px;
float:left;
}
.logo-right
{
width:300px;
float:right;
height:28px;
margin-top:30px;
color:#8e8e8e;
}
.logo-right img
{
vertical-align:middle;
margin-right:10px;
}
.tel
{
font-family:"微软雅黑";
font-size:16px;
color:#C00;
}
.nav
{
height:40px;
}
.nav-left
{
width:10px;
background:url(../images/nav_left.jpg)no-repeat;
}
.nav-mid
{
width:980px;
background:url(../images/nav_bg.jpg)repeat-x;
}
.nav-right
{
width:10px;
background:url(../images/nav_right.jpg)no-repeat;
}
.nav-left,.nav-mid,.nav-right
{
float:left;
height:40px;
}
.nav-mid-left,.nav-mid-right
{
float:left;
}
.nav-mid-left
{
width:680px;
}
.nav-mid-right
{
width:300px;
}
.nav-mid-left li
{
float:left;
list-style-type:none;
width:100px;
text-align:center;
line-height:40px;
}
.nav-mid-left a:link,.nav-mid-left a:visited
{
text-decoration:none;
color:#FFF;
font-size:16px;
font-family:"微软雅黑";
}
.nav-mid-left a:hover,.nav-mid-left a:active
{
text-decoration:none;
color:#FF0;
font-size:16px;
font-family:"微软雅黑";
}
.search-text
{
width:190px;
height:25px;
margin-top:5px;
background:url(../images/search.jpg)no-repeat right center;
background-color:#FFF;
padding-right:25px;
border:1px solid #FFF;
}
.ad
{
height: 310px;
width: 1000px;
margin:0 auto;
overflow: hidden;
}
.main
{
height:250px;
background-color:#C09;
}