div+css如何控制导航高度

来源:百度知道 编辑:UC知道 时间:2024/06/23 00:10:35
我在做一个导航,我已经做好了,但是,我做好了导航,可是再在下面做另一个盒子的时候,就怎么也和上面的导航对不上,这是怎么回事啊?

请教各位大帅指点~!小弟急用~!

这是我写的:
.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" /&

.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也给个宽度 不久对上了吗?
具体,发个图上来吧

<!-- <!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