div+css如何控制导航高度
我在做一个导航,我已经做好了,但是,我做好了导航,可是再在下面做另一个盒子的时候,就怎么也和上面的导航对不上,这是怎么回事啊?请教各位大帅指点~!小弟急用~!这是我写的:...
我在做一个导航,我已经做好了,但是,我做好了导航,可是再在下面做另一个盒子的时候,就怎么也和上面的导航对不上,这是怎么回事啊?
请教各位大帅指点~!小弟急用~!
这是我写的:
.news1{ width:287px; height:149px;margin:0; padding:0;background:url(../images/index_53.gif) no-repeat; text-align:center;}
.news2{margin:0;padding:0;}
.news2 ul{list-style-type:none; padding:0; width:287px;height:19px;margin:0; }
.news2 li{float:left; margin:0; padding:0; line-height:18px;}
.news2 a{display:block;text-align:center;height:19px; width:39px;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:link{color:#004c65;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:visited{color:#004c65;text-decoration:none;}
.news2 a:hover{color:#000;text-decoration:underline;background:#e5fafd;}
<div class="news2">
<ul>
<li><img src="images/index_58.gif" width="42px" height="19px" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_63.gif" width="38px" height="19px" /></li>
</ul>
</div>
<div class="news1"></div> 展开
请教各位大帅指点~!小弟急用~!
这是我写的:
.news1{ width:287px; height:149px;margin:0; padding:0;background:url(../images/index_53.gif) no-repeat; text-align:center;}
.news2{margin:0;padding:0;}
.news2 ul{list-style-type:none; padding:0; width:287px;height:19px;margin:0; }
.news2 li{float:left; margin:0; padding:0; line-height:18px;}
.news2 a{display:block;text-align:center;height:19px; width:39px;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:link{color:#004c65;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:visited{color:#004c65;text-decoration:none;}
.news2 a:hover{color:#000;text-decoration:underline;background:#e5fafd;}
<div class="news2">
<ul>
<li><img src="images/index_58.gif" width="42px" height="19px" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_63.gif" width="38px" height="19px" /></li>
</ul>
</div>
<div class="news1"></div> 展开
3个回答
展开全部
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="ErrorPageTemplate.css" />
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=utf-8">
<title>安全设置风险</title>
<style type="text/css">
.news1{ width:287px; height:149px;margin:0; padding:0;background:url(../images/index_53.gif) no-repeat; text-align:center;}
.news2{margin:0;padding:0;}
.news2 ul{list-style-type:none; padding:0; width:687px;height:19px;margin:0; }
.news2 li{float:left; margin:0; padding:0; line-height:18px;}
.news2 a{display:block;text-align:center;height:19px; width:39px;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:link{color:#004c65;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:visited{color:#004c65;text-decoration:none;}
.news2 a:hover{color:#000;text-decoration:underline;background:#e5fafd;}
</style>
</head>
<body>
<div class="news2">
<ul>
<li><img src="images/index_58.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_63.gif" /></li>
</ul>
</div>
<div class="news1"></div>
</body>
</html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="ErrorPageTemplate.css" />
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=utf-8">
<title>安全设置风险</title>
<style type="text/css">
.news1{ width:287px; height:149px;margin:0; padding:0;background:url(../images/index_53.gif) no-repeat; text-align:center;}
.news2{margin:0;padding:0;}
.news2 ul{list-style-type:none; padding:0; width:687px;height:19px;margin:0; }
.news2 li{float:left; margin:0; padding:0; line-height:18px;}
.news2 a{display:block;text-align:center;height:19px; width:39px;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:link{color:#004c65;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:visited{color:#004c65;text-decoration:none;}
.news2 a:hover{color:#000;text-decoration:underline;background:#e5fafd;}
</style>
</head>
<body>
<div class="news2">
<ul>
<li><img src="images/index_58.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_61.gif" /></li>
<li><a href="#">全部</a></li>
<li><img src="images/index_63.gif" /></li>
</ul>
</div>
<div class="news1"></div>
</body>
</html>
展开全部
应该是这样吧 放到 body 与body之间
<style type="text/css">
.news1{ width:287px; height:149px;margin:0; padding:0;background:url(../images/index_53.gif) no-repeat; text-align:center; background:#006600;}
.news2{margin:0;padding:0;}
.news2 ul{list-style-type:none; padding:0; width:500px;height:19px;margin:0; }
.news2 li{float:left; margin:0; padding:0; line-height:19px;}
.news2 a{display:block;text-align:center;height:19px; line-height:29px; width:50px;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:link{color:#004c65;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:visited{color:#004c65;text-decoration:none;}
.news2 a:hover{color:#000;text-decoration:underline;background:#e5fafd;}
</style>
<div class="news2">
<ul>
<li><img src="aaa.jpg" width="32" height="32" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" width="32" height="32" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" width="32" height="32" /></li>
</ul>
</div>
<div class="news1"></div>
<style type="text/css">
.news1{ width:287px; height:149px;margin:0; padding:0;background:url(../images/index_53.gif) no-repeat; text-align:center; background:#006600;}
.news2{margin:0;padding:0;}
.news2 ul{list-style-type:none; padding:0; width:500px;height:19px;margin:0; }
.news2 li{float:left; margin:0; padding:0; line-height:19px;}
.news2 a{display:block;text-align:center;height:19px; line-height:29px; width:50px;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:link{color:#004c65;background:url(../images/gonggao-bg.gif) no-repeat;text-decoration:none;}
.news2 a:visited{color:#004c65;text-decoration:none;}
.news2 a:hover{color:#000;text-decoration:underline;background:#e5fafd;}
</style>
<div class="news2">
<ul>
<li><img src="aaa.jpg" width="32" height="32" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" width="32" height="32" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" /></li>
<li><a href="#">全部</a></li>
<li><img src="aaa.jpg" width="32" height="32" /></li>
</ul>
</div>
<div class="news1"></div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
.news1{ width:287px; height:149px;margin:0; padding:0;background:url(../images/index_53.gif) no-repeat; text-align:center;}
.news2{margin:0;padding:0;}
这里 news 2也给个宽度 不久对上了吗?
具体,发个图上来吧
.news2{margin:0;padding:0;}
这里 news 2也给个宽度 不久对上了吗?
具体,发个图上来吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询